Esempio n. 1
0
 public function findCategoryVideosCount($category)
 {
     $catId = IVIDEO_BOL_CategoryService::getInstance()->getCategoryId($category);
     $categoryDao = IVIDEO_BOL_VideoCategoryDao::getInstance();
     $query = "SELECT COUNT(*) FROM " . $this->getTableName() . " a," . $categoryDao->getTableName() . " b\n                  WHERE a.status = 'approved'\n                    AND a.id = b.videoID\n                    AND a.privacy = 'everybody' \n                    AND b.categoryId = " . $catId;
     return $this->dbo->queryForColumn($query);
 }
Esempio n. 2
0
 public function setVideoCategories($videoId, $categoryId)
 {
     $category = new IVIDEO_BOL_VideoCategory();
     $category->videoId = $videoId;
     $category->categoryId = $categoryId;
     IVIDEO_BOL_VideoCategoryDao::getInstance()->save($category);
     return $category->id;
 }
Esempio n. 3
0
 public function getAllVideoCategories($page, $limit)
 {
     return IVIDEO_BOL_VideoCategoryDao::getInstance()->getAllVideoCategories($page, $limit);
 }