0
点赞
收藏
分享

微信扫一扫

tp6 数组查询where

Silence潇湘夜雨 2022-07-27 阅读 105


$map[] = ['name','like','think']; 

$map[] = ['status','=',1];

$map = [
['name', 'like', 'thinkphp%'],
['title', 'like', '%thinkphp'],
['id', '>', 0],
];
Db::table('think_user')
->where([ $map ])
->where('status',1)
->select();

 

官方文档:

​​https://www.kancloud.cn/manual/thinkphp6_0/1037566​​

​​https://www.kancloud.cn/manual/thinkphp6_0/1037539​​

 

举报

相关推荐

0 条评论