Ver original$where = "tabla1.campo1=valor1 AND (tabla2.campo2=valor2 OR tabla3.campo3=valor3) AND tabla4.campo4=valor4"; $this->db->where($where);