[eluser]mdcode[/eluser]
Best way that I have found is to do this (it's in the manual):
Code:
$where = "field1 = 'value1' AND (field2 = 'value2' OR field3 = 'value3')";
$this->db->select('*');
$this->db->from('table');
$this->db->where($where);
$query = $this->db->get();
return $query;
While this has not been tested and it's going from memory from my working system, it should be pretty close to where you want to go...