tp5.1 where IN语句

浏览:36825 发布日期:2019/07/29 分类:ThinkPHP5专区 关键字: tp5.1
tp5.1 where in语句的查询用法// 传入数组作为查询条件 可以直接上传IN查询,
Db::table('think_user')->where([
    'name'    =>    'thinkphp',
        'status'     =>    [1, 2]
])->select(); 
生成SELECT * FROM think_user WHERE `name`='thinkphp' AND status IN (1, 2)
最佳答案
评论( 相关
后面还有条评论,点击查看>>