where 两个字段异或

浏览:1743 发布日期:2015/02/04 分类:求助交流
$data=$model->where(array(
'serial_number'=>array(array('eq', ''), array('exp', 'is null'), 'or'),
'train' =>array(array('eq', ''), array('exp', 'is null'), 'or'),
'stu_status' =>array('in', '23,3'),
))->select();
要生成这样sql如何修改
select * from zm_student where (serial_number='' or train='') and stu_status in (23,3)
最佳答案
评论() 相关
后面还有条评论,点击查看>>