I\'m producing a query like the following using ActiveRecord
SELECT * FROM (`foods`) WHERE `type` = \'fruits\' AND `tags` LIKE \'%green%\' OR `tags`
You can't add parentheses in ActiveRecord, but maybe WHERE IN is what you're looking for?
$names = array('Frank', 'Todd', 'James'); $this->db->where_in('username', $names); // Produces: WHERE username IN ('Frank', 'Todd', 'James')