Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach ($cats as $cat) {
- $this->db->select('vjc.*,v.*,vt.*,ct.*, `f`.*, `vt`.`name` AS `name_text`,v.id_video as video_id')
- ->from("video_join_category_develop as vjc")
- ->join("video as v","vjc.id_video = v.id_video")
- ->join("video_text as vt","vt.id_video = v.id_video")
- ->join("category as c","c.id_category = vjc.id_category")
- ->join("category_text as ct","ct.id_category = c.id_category")
- ->join("file as f", "f.id_video = v.id_video", "left")
- ->where("vjc.id_category", $cat->id_category)
- ->where("vjc.category_level", 1)
- ->where("v.is_active", 1)
- ->where("c.is_active", 1)
- ->where("TRIM(vt.name) <> ''")
- ->where("vjc.id_language", $this->config->item('id_language'))
- ->group_by("v.id_video")
- ->order_by("vjc.sort_video", "ASC")
- ->limit(12);
- $query = $this->db->get();
- $videoes = $query->result();
- $category_videos_section[$cat->name] = $videoes;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement