tp6 数组查询where

阅读 105

2022-07-27


$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)

0 0 举报