条件查询问题

来源:互联网 发布:万网注册已备案域名 编辑:程序博客网 时间:2024/06/07 18:46
$where   array("usname"=>array('neq','1'));  //不等于
$map['status']   = array(in,"0,3"); //或者
//电话和用户名  都可以登陆的情况
$where['name']    =   I('post.username');
$where['mobile']   =  I('post.username');
$where['_logic']     = 'or';  //或者
$where['_complex'] = $map;  //合并$where['password'] = md5(I('post.password'));

$where['title']      = array('LIKE', '%'.$title.'%');  //模糊查询
$where['time'] = array('between' ,array($start_time,$end_time)); //在此之间
$where['time'] = array('gt','$start_time');  //大于。。。
$where['time'] = array( 'lt','$end_time');   //小于。。。

原创粉丝点击