[eluser]chefnelone[/eluser]
Hello
Which operator should I use to do this:
I have this line which works fine if categories.id_category = products.categorias
Code:
$this->db->join('categories', 'categories.id_category = products.categorias');
Then the join is done if e.g.:
categories.id_category= '5'
and
products.categorias = '5'
But what I need is something like:
categories.id_category IS CONTAINED IN products.categorias
Then the join should work if e.g.:
categories.id_category= '5'
and
products.categorias = '5 7 8 1'
because '5' is in '5 7 8 1'
Something like:
Code:
$this->db->join('categories', 'categories.id_category IS CONTAINED IN products.categorias');