[eluser]mddd[/eluser]
You'll have to make a where_in call for each of those tables.
If you want to see any of the two fields matches THE SAME list of cats
(meaning: if 'table1.cat' is equal to 1 or 2, or 'table2.cat' is equal to 1 or 2):
Code:
// .. first make the $cats array like before
$cats = array(1,2);
// now check it against more than 1 table
$this->db->where_in('table1.cat', $cats);
$this->db->or_where_in('table2.cat', $cats);
If you want to see if any of the two fields matches A DIFFERENT list of cats
(meaning: if 'table1.cat' is equal to 1 or 2, or table2.cat' is equal to 3 or 4):
Code:
// .. first make an array for each table you want to check
$cats1 = array(1,2);
$cats2 = array(3,4);
// now check it against more than 1 table
$this->db->where_in('table1.cat', $cats1);
$this->db->or_where_in('table2.cat', $cats2);