![]() |
Problems with where_not_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: Problems with where_not_in (/showthread.php?tid=18182) |
Problems with where_not_in - El Forum - 04-28-2009 [eluser]webnology[/eluser] Hi all, I have a table with bands, and a table with genres. I also have a table that links both. So aband can have multiple genres. Now I want to show all genres that have not been assign to aband yet. So I'm trying this: Get all genres in the bands2genre table, and the use that array as an exclusion for the genre table. Code: //Get all genres, except those assigned to the band However, Im having errors: like this: Code: A PHP Error was encountered So, is my $assigned_genres not an array? Any help appreciated! Michel Problems with where_not_in - El Forum - 04-28-2009 [eluser]xwero[/eluser] get returns the query object not the actual result. The where_not_in expects an array as second parameter so the code changes are Code: $assigned_genres = $this->db->get(); Problems with where_not_in - El Forum - 04-28-2009 [eluser]webnology[/eluser] Great, thx man. |