Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function total_count {
- $this->db->select('user_id, COUNT(user_id) as total');
- $this->db->group_by('user_id');
- $this->db->order_by('total', 'desc');
- $this->db->get('tablename', 10);
- }
- $data = array (
- 'totalcount' => $this->mymodel->total_count(),
- );
- Echo $totalcount
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement