[eluser]jparent[/eluser]
Hi I have this code:
Code:
$this->db->select("'field'");
$this->db->like('username',$user);
$this->db->group_by('field');
$obj = $this->db->get('sometable');
return $obj->result();
I want to know if there is some way to do somethink like:
Code:
$this->db->select("disticnt 'field'");
$this->db->like('username',$user);
$this->db->group_by('field');
$obj = $this->db->get('sometable');
return $obj->result();
because this code give me an error because it puts "select 'distinct' 'field' from..."
and gives me an error like: "'distinct' is not a field"
How I can do that? I think use the group_by can simulate the distinct clause. I don't know certainly.