In CodeIgniter 3 gibt es neue Methoden group_start() und group_end() die genau diesem Zweck dienen.
return $this->db
->where('LastName', 'Svendson');
->where('Age', 12);
->group_start()
->where('FirstName','Tove')
->or_where('FirstName','Ola')
->or_where('Gender','M')
->or_where('Country','India')
->group_end()
->get('Persons')
->result();