$map['_logic'] = 'or';如何写出下面的sql

浏览:3106 发布日期:2015/11/05 分类:求助交流
SELECT * FROM `wsj_coupon` WHERE ( `user_id` = '3' AND `coupon_name` LIKE '%g%' ) OR (`use_range` = 0 and `state` = 0 )


$map['_logic'] = 'or';//开始or条件
$map['_complex'] = $where;

//方式一
//$map['use_range&state'] =array('0','0','_multi'=>true);
//方式二
//$map['_string'] = 'use_range =0 and state =0 ';

//我想用这样的方式,问题是我想用下面的方 怎么弄
$map['use_range']=0; //通用优惠卷
$map['state']=0; //通用优惠卷
最佳答案
评论( 相关
后面还有条评论,点击查看>>