thinkphp 5, and与or多条件查询

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/viqecel/article/details/82827433

最终的查询条件为where feed_uid=5 and (status=1 or status =2 or status =3 )

$where = [
 'feed_uid'     => [ 'eq' , 5] ,
 'status' => [ [ 'eq' , 1] , [ 'eq' , 2 ] ,  [ 'eq' , 3 ] , 'or' ] ,
   ];
 $value = DealSpace::where($where)->count();

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/viqecel/article/details/82827433