我在codeigniter中使用'where'时遇到了一些问题,我想修改不使用和但使用or的子句。codeigniter where in clause显示结果是或
这是代码:
$this->db->where_in('id','1,2,3');
它的工作原理是这样的:
$this->db->where('id',1);
$this->db->where('id',2);
$this->db->where('id',3);
,但我想要的结果是这样的:
$this->db->where('id',1);
$this->db->or_where('id',2);
$this->db->or_where('id',3);
,但它仍然使用其中不哪里。谢谢
添加您正在使用的所有代码。 –
请发布你想得到的结果。并且你得到了什么结果。也张贴您有的样品表。 –