php - select('*') with group_by in Codeigniter -
i working in codeigniter. problem want show rows having same id. when perform group_by outputs 1 row of group.
below model
function category_content(){         $this->db->select('*');         $this->db->from('category');         $this->db->group_by('category_id');         $query = $this->db->get();         return $query->result_array();     }   please help.
as per sql properties group by groups matching records , show one. seems want sort them id. better use order by 
Comments
Post a Comment