Codeigniter: Join with 'where in' clause
I want to join tables to list books of two categories fiction and romance. How do I do a JOIN with a WHERE IN clause (is that even possible? sorry, noob here)
Here's where I'm stuck at:
$categories = array(10,12);
$query = select()->from('books');
$query->join('genre_map','genre_map.gid IN ('.implode(",", $categories).')');
Jn Table genre_map: bookid, genre_id
Any SQL Query/CodeIgniter help would be much appreciated.