当我在codeigniter中使用它时,它只选择最后一个数组索引
$array = array("status !=" => "deleted", "status !=" => "concept");
$this->db->where($array);这就是结果:
SELECT * FROM (`table`) WHERE `status` != 'concept'有没有人知道为什么或者知道更好的方法?
发布于 2012-02-22 10:15:47
如果所有子句的列都相同,则where_not_in()方法将是比多个where()更好/更简洁的选择。它就像它说的那样做--创建一个NOT IN (..)子句
示例用法:
$this->db->where_not_in('status', $bad_statuses);https://stackoverflow.com/questions/7328065
复制相似问题