[eluser]jacobson[/eluser]
Hello I have a problem with my website. I have 3 tables.
Table 1 Consists of id's from Table 2 and 3
it's hard to describe it with words ;p
Code:
$q = $this->db->select('*')->from('table1')->join('table2', 'table1.category = table2.id', 'left')->join('table3', 'table1.news= table3.id', 'left')->where_in('category', $categories)->get();
$categories is an array of id's. My problem is when I have for example 3 id's in my $categories it shows everything properly. The same with 2 id's and 1 id. Problem appears when I pass an empty $categories array because then my statement returns so many records with undefined fields.
Mabe I did a mistake in my query. I would appreciate your help with this one