/** * Обновляет блог в БД * * @param ModuleBlog_EntityBlog $oBlog Объект блога * @return bool */ public function UpdateBlog(ModuleBlog_EntityBlog $oBlog) { $sql = "UPDATE " . Config::Get('db.table.blog') . " \n\t\t\tSET \n\t\t\t\tblog_title= ?,\n\t\t\t\tblog_description= ?,\n\t\t\t\tblog_type= ?,\n\t\t\t\tblog_date_edit= ?,\n\t\t\t\tblog_rating= ?f,\n\t\t\t\tblog_count_vote = ?d,\n\t\t\t\tblog_count_user= ?d,\n\t\t\t\tblog_count_topic= ?d,\n\t\t\t\tblog_limit_rating_topic= ?f ,\n\t\t\t\tblog_url= ?,\n\t\t\t\tblog_avatar= ?\n\t\t\tWHERE\n\t\t\t\tblog_id = ?d\n\t\t"; if ($this->oDb->query($sql, $oBlog->getTitle(), $oBlog->getDescription(), $oBlog->getType(), $oBlog->getDateEdit(), $oBlog->getRating(), $oBlog->getCountVote(), $oBlog->getCountUser(), $oBlog->getCountTopic(), $oBlog->getLimitRatingTopic(), $oBlog->getUrl(), $oBlog->getAvatar(), $oBlog->getId())) { return true; } return false; }
/** * Обновляет блог в БД * * @param ModuleBlog_EntityBlog $oBlog Объект блога * * @return bool */ public function UpdateBlog($oBlog) { $sql = "\n UPDATE ?_blog\n SET\n blog_title = ?,\n blog_description = ?,\n blog_type = ?,\n blog_date_edit = ?,\n blog_rating = ?f,\n blog_count_vote = ?d,\n blog_count_user = ?d,\n blog_count_topic = ?d,\n blog_limit_rating_topic = ?f ,\n blog_url = ?,\n blog_avatar = ?\n WHERE\n blog_id = ?d\n "; $bResult = $this->oDb->query($sql, $oBlog->getTitle(), $oBlog->getDescription(), $oBlog->getType(), $oBlog->getDateEdit(), $oBlog->getRating(), $oBlog->getCountVote(), $oBlog->getCountUser(), $oBlog->getCountTopic(), $oBlog->getLimitRatingTopic(), $oBlog->getUrl(), $oBlog->getAvatar(), $oBlog->getId()); return $bResult !== false; }
/** * Обновляет блог в БД * * @param ModuleBlog_EntityBlog $oBlog Объект блога * @return bool */ public function UpdateBlog(ModuleBlog_EntityBlog $oBlog) { $sql = "UPDATE " . Config::Get('db.table.blog') . "\n\t\t\tSET \n\t\t\t\tblog_title= ?,\n\t\t\t\tblog_description= ?,\n\t\t\t\tblog_type= ?,\n\t\t\t\tblog_date_edit= ?,\n\t\t\t\tblog_count_vote = ?d,\n\t\t\t\tblog_count_user= ?d,\n\t\t\t\tblog_count_topic= ?d,\n\t\t\t\tblog_limit_rating_topic= ?f ,\n\t\t\t\tblog_url= ?,\n\t\t\t\tblog_skip_index= ?d,\n\t\t\t\tblog_avatar= ?\n\t\t\tWHERE\n\t\t\t\tblog_id = ?d\n\t\t"; $res = $this->oDb->query($sql, $oBlog->getTitle(), $oBlog->getDescription(), $oBlog->getType(), $oBlog->getDateEdit(), $oBlog->getCountVote(), $oBlog->getCountUser(), $oBlog->getCountTopic(), $oBlog->getLimitRatingTopic(), $oBlog->getUrl(), $oBlog->getSkipIndex(), $oBlog->getAvatar(), $oBlog->getId()); return $this->IsSuccessful($res); }