Welcome Guest, Not a member yet? Register   Sign In
DISTINCT Does not work as a keyword in codeigniter....
#1

[eluser]RaviDalal[/eluser]
I am writing following codeigntier function using which i want to fetch distinct record for contact_type field..........

function getdetaildatabyid($id)
{
$this->db->select("contact_details_id,contact_id,contact_type,contact_value");
$this->db->from("tbl_contact_details");
$this->db->where("tbl_contact_details.contact_id",$id);
$query = $this->db->get();
$data = $query->result();
echo $this->db->last_query();die;
return $data;
}


In above given code where should i put distinct to fetch only single occurance of contact_type record????

Please Help.......

Thnx in advance

Ravi Dalal


Messages In This Thread
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 02:12 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 02:30 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 02:35 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 03:05 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 03:52 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 04:49 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 05:35 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 05:41 AM
DISTINCT Does not work as a keyword in codeigniter.... - by El Forum - 02-25-2012, 05:50 AM



Theme © iAndrew 2016 - Forum software by © MyBB