文章来源于网络收集而来,版权归原创者所有,如有侵权请及时联系!
get
get
从表中返回一行数据
get($table, $columns, $where)table [string]
表名.
columns [string/array]
返回的字段列.
where (optional) [array]
WHERE 条件.
table [string]
表名.
join [array]
表的关联,如果没有可忽略.
columns [string/array]
返回的字段列.
where (optional) [array]
WHERE 条件.
$email = $database->get("account", "email", [ "user_id" => 1234]);// $email = "foo@bar.com"$profile = $database->get("account", [ "email", "gender", "location"], [ "user_id" => 1234]);// $profile = array(// "email" => "foo@bar.com",// "gender" => "female",// "location" => "earth"// )$data = $database->get("post", [ "[>]account" => "user_id"], [ "post.content", "account.user_name", "account.location"], [ "ORDER" => "post.rate"]);// $data = array(// "content" => "A new day",// "user_name" => "foo",// "location" => "earth"// )
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论