tp where使用数组条件,如何设置or,and

1 //where条件数组拼接
2 $where['status'] = 1;
3 $maps['id'] = ['in', implode(',', $r_ids)];
4 $maps['uid'] = $where['uid'];
5 $maps['_logic'] = 'OR';
6 $where['_complex'] = $maps;

打印出来效果  此时 id 与 uid 的关系就是or的关系

 

posted @ 2019-09-11 15:59  宁佳兵  阅读(3954)  评论(0编辑  收藏  举报