ThinkPHP常用查询

1.常规

 $map2['state'] = 1;

$User->where ( $map2 )->find();

2. OR 查询

$where['name'] = array('neq','liudehua');

$where['age'] = array('eq',10);
$where['_logic'] = 'or';
$map2['_complex'] = $where;

$map2['user']='cc';

3.多字段查询

方式一

$map2['user&age']=array('chen','23','_multi'=>true);

方式二

$map['_string'] = "user = '23' and state =0 ";

原文地址:https://www.cnblogs.com/xcsn/p/5698775.html