Welcome Guest, Not a member yet? Register   Sign In
how to select the distinct values
#1

[eluser]Bigil Michael[/eluser]
I want to list the members who have products. Query i have written is given below
Code:
$this->db->select('c.*, m.*, cc.category_name, cs.subcategory_name,  css.sub_subcategory_name');
     $this->db->from('classifieds AS c');
  $this->db->join('classi_sub_subcategory AS css', 'css.sub_subcategory_id = c.sub_subcategory_id');
  $this->db->join('classi_subcategory AS cs', 'cs.subcategory_id = css.subcategory_id');
  $this->db->join('classifieds_category AS cc', 'cc.category_id = cs.category_id');
  $this->db->join('members AS m', 'm.id = c.member_id');
  $this->db->where('c.status', 1);
  
     $result_product = $this->db->get();
  return $result_product->result();


It is running fine but member details are repeating. i want to print the member details name only once.
can any one help me????
thanks in advance....


Messages In This Thread
how to select the distinct values - by El Forum - 08-03-2012, 11:50 PM
how to select the distinct values - by El Forum - 08-05-2012, 12:37 AM
how to select the distinct values - by El Forum - 08-05-2012, 10:53 AM
how to select the distinct values - by El Forum - 08-05-2012, 03:50 PM
how to select the distinct values - by El Forum - 08-06-2012, 12:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB