Advertisement
Guest User

Untitled

a guest
Oct 17th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. foreach ($cats as $cat) {
  2.  
  3. $this->db->select('vjc.*,v.*,vt.*,ct.*, `f`.*, `vt`.`name` AS `name_text`,v.id_video as video_id')
  4. ->from("video_join_category_develop as vjc")
  5. ->join("video as v","vjc.id_video = v.id_video")
  6. ->join("video_text as vt","vt.id_video = v.id_video")
  7. ->join("category as c","c.id_category = vjc.id_category")
  8. ->join("category_text as ct","ct.id_category = c.id_category")
  9. ->join("file as f", "f.id_video = v.id_video", "left")
  10. ->where("vjc.id_category", $cat->id_category)
  11. ->where("vjc.category_level", 1)
  12. ->where("v.is_active", 1)
  13. ->where("c.is_active", 1)
  14. ->where("TRIM(vt.name) <> ''")
  15. ->where("vjc.id_language", $this->config->item('id_language'))
  16. ->group_by("v.id_video")
  17. ->order_by("vjc.sort_video", "ASC")
  18. ->limit(12);
  19. $query = $this->db->get();
  20. $videoes = $query->result();
  21.  
  22. $category_videos_section[$cat->name] = $videoes;
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement