tp5嵌套查询如何传参数?

浏览:2337 发布日期:2017/03/24 分类:ThinkPHP5专区
Db::table('think_user')
->where('id','IN',function($query){
$query->table('think_profile')->where('status',1)->field('id');
})
->select();
这种查询如果要传递外部参数怎么办(例如status的条件是个外部变量),我运行了下报错参数不存在~~~~在线等~~~
最佳答案
评论() 相关
后面还有条评论,点击查看>>