tp3.2多条件复合查询

版权声明:俗世凡人行(释) QQ:748507607 https://blog.csdn.net/weixin_41887155/article/details/89249562
 //tp3.2中复合条件组装

 满足条件a=1或者b不等于1,且name等于小三的条件

 $where['name'] = "小三",
 $where11['a'] = array('EQ',1);
 $where11['b'] = array('NEQ',1);
 $where11['_logic'] = "OR";
 $where['_complex'] = $where11;
 $where['_logic'] = "AND";  
 $where['_complex'] = $where;
 M('user')->where($where)->select();

猜你喜欢

转载自blog.csdn.net/weixin_41887155/article/details/89249562