[eluser]chefnelone[/eluser]
Hello,
I'm usign this active record(which works fine):
Code:
$this->db->join('categories', 'categories.id_category = products.category_id' , 'left');
but... I need to join categories based in the value of $category_id instead of based in the value of of the field: products.category_id.
Something like: (not working)
Code:
$category_id = 228;
$this->db->join('categories', 'categories.id_category = '.$category_id , 'left');
I know I've got a problem with logic of the tables and I'll have to make some changes with them... but I need to solve this now.
Any ideas?
Thanks