最终的查询条件为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();
本文详细解析了如何使用SQL构造复杂的查询条件,包括多个条件的组合使用,如'and'和'or'操作符,以及如何利用这些操作符进行数据筛选,特别关注于在特定字段中寻找匹配项。
最终的查询条件为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();
605

被折叠的 条评论
为什么被折叠?