Distinct in Codeigniter Query
Distinct in Codeigniter Query You can use $this->db->distinct() to add the distinct in codiegniter query. Here in this tutorial we are going to create an example for distinct Query.
Distinct in Codeigniter Query Example
Here is an example of distinct query in codeigniter-
Distinct in Codeigniter Query Example:
$where_array = array( 'email'=>'test@gmail.com', 'status'=>'1' ); $table_name = "users"; $limit = 10; $offset = 0; $this->db->distinct(); $query = $this->db->get_where($table_name,$where_array, $limit, $offset); |
On the same you can add distinct in codeigniter in any query.
Advertisements