帮忙写一段thinkphp的查询条件语句
sql命令查询是WHERE(statusIN(1,2,5))or(status=0ANDis_daofu=1)在thinkphp中$map=要怎么写呢$where['st...
sql命令查询是 WHERE (status IN (1,2,5)) or (status=0 AND is_daofu=1)
在thinkphp中 $map= 要怎么写呢
$where['status'] = array('IN',array(1,2,5));
$where['_logic'] = 'or';
$map['_complex'] = $where;
$map['_string'] = 'status=0 AND is_daofu=1';
这个好像输出是不对。输出空白··
$list = $Order->where($map)->order(array('order_id' => 'desc'))->limit($Page->firstRow . ',' . $Page->listRows)->select(); 展开
在thinkphp中 $map= 要怎么写呢
$where['status'] = array('IN',array(1,2,5));
$where['_logic'] = 'or';
$map['_complex'] = $where;
$map['_string'] = 'status=0 AND is_daofu=1';
这个好像输出是不对。输出空白··
$list = $Order->where($map)->order(array('order_id' => 'desc'))->limit($Page->firstRow . ',' . $Page->listRows)->select(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询