用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2973|回复: 1
收起左侧

[HELP] CI database or_where

[复制链接]
发表于 2011-2-17 15:00:08 | 显示全部楼层 |阅读模式
使用CI_DB如何实现 `column1`="value1" AND (`column2`="value2" OR `column3`="value3")如下,只能组装为 `column1`="value1" AND `column2`="value2" OR `column3`="value3"
$this->db->where('column1', 'value1');
$this->db->where('column2', 'value2');
$this->db->or_where('column3', 'value3');
发表于 2011-2-17 17:57:00 | 显示全部楼层
不好实现就直接写条件吧,不必过于纠结

本版积分规则