thinkphp 多条件联合查询 where例句

     $where['username'] = array("eq",$username);

              $where['phone'] = array("eq",$username);

              $where['email'] = array("eq",$username);

              $where['_logic'] = "or";  //逻辑或,  where数组中条件进行or 运算

              $map['_complex'] = $where; //联合查询

              $map['_logic'] = "and"; //逻辑且 map 数组中条件进行and 运算

              $map['password'] = array("eq",$this->_post("password"));

posted on 2016-01-06 16:59  lightblue_sky  阅读(592)  评论(0编辑  收藏  举报

导航