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的关系
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的关系