multiple where_in - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: multiple where_in (/showthread.php?tid=5288) |
multiple where_in - El Forum - 01-15-2008 [eluser]Seppo[/eluser] Heym I've just checkout the current CI version on the SVN and give it a try, but I had a problem... My code Code: $this->db->where_in('id', array(1, 2, 3)); I´m getting that the executed query is: Code: SELECT * FROM (country) WHERE id IN (1, 2, 3) AND name IN (1, 2, 3, 'Angola', 'Benin') So the first and the second where_in are getting mixed... Is there a restriction to one "in" statement per query, or is this a bug? Also the examples are complitly wrong... $this->db->or_where_in(); Quote:$names = array('Frank', 'Todd', 'James');The method is wrong in the example, and the produces is an awful SQL sentence. The same thing happend in $this->db->or_where_not_in() and partially in $this->db->where_not_in() |