【发布时间】:2014-08-07 16:18:21
【问题描述】:
在 mysql 中有 select * from table where 条件和(条件或条件)。 这也有codeigniter的代码吗? 示例伪代码
$this->db->select("*");
$this->db->from("table");
$this->db->where("condition", $var):
.... now the second where should be --> and (condition or condition)
【问题讨论】:
-
or_where 怎么样?或者你可以使用查询函数来写你的任何东西。
-
我想我的回答得到了赞成,但我才意识到我认为它并没有真正回答你的问题 - 看看这些:stackoverflow.com/questions/12981351/codeigniter-and-or-and 还有stackoverflow.com/questions/11056303/…
标签: php mysql codeigniter