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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-24
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
  • 2022-01-18
相关资源
相似解决方案