Guest User

Untitled

a guest
Jan 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1.     //Load the category list to the forum frontpage
  2.     function loadCategoryList() {
  3.        
  4.         $this->db->select('forumCategory.id as categoryID, category, description, forumThread.id as threadID');
  5.         $this->db->where('forumCategory.approved', 'yes');
  6.         $this->db->join('forumThread', 'forumThread.fk_forumCategory = forumCategory.id');
  7.         $this->db->group_by('categoryID');
  8.         $loadCategory = $this->db->get('forumCategory');
  9.        
  10.         return $loadCategory->result();
  11.        
  12.     }
Add Comment
Please, Sign In to add comment