![]() |
Active Record - Where filter with same keys - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Development (https://forum.codeigniter.com/forumdisplay.php?fid=6) +--- Forum: CodeIgniter 2.x (https://forum.codeigniter.com/forumdisplay.php?fid=18) +--- Thread: Active Record - Where filter with same keys (/showthread.php?tid=617) |
Active Record - Where filter with same keys - CiUser - 12-26-2014 Hi team, I'm having an issue when trying to build a where filter with same keys. Example PHP Code: $where = array( Any solution? Thanks in advance! RE: Active Record - Where filter with same keys - Rufnex - 12-26-2014 Try a simple trick with an space PHP Code: $where = array( Otherwise you can do it for each where with where (for and logic) or with or_where (for or logic) like PHP Code: $this->db->where('state <>', 'foo'); RE: Active Record - Where filter with same keys - includebeer - 12-26-2014 For multiple values it's best to use "where in ()" or "where not in ()" PHP Code: $this->db->where_not_in('state', array('foo', 'bar')); |