/** * 临时::课程的评论数 * 数据导入时没有对一些统计数据加处理.所以这里做了一个重新统计. */ public function getCourseCommentTotal($courseId) { $tblComment = new DB_Haodu_CourseComment(); return $tblComment->queryCount("where course_id = {$courseId}"); }
/** * 举报次数+1 */ public function incrReportNum($commentId) { $tbl = new DB_Haodu_CourseComment(); $tbl->increase($commentId, array("report_num" => 1)); }
/** * 视频评论数量 */ public function getVideoCommentNum($videoId) { $tbl = new DB_Haodu_CourseComment(); return $tbl->queryCount("where video_id = {$videoId}"); }