Beispiel #1
0
 public function UpdateComment(ModuleComment_EntityComment $oComment)
 {
     $sql = "UPDATE " . Config::Get('db.table.comment') . " \n\t\t\tSET \n\t\t\t\tcomment_text= ?,\n\t\t\t\tcomment_rating= ?f,\n\t\t\t\tcomment_count_vote= ?d,\n\t\t\t\tcomment_delete = ?d ,\n\t\t\t\tcomment_publish = ?d ,\n\t\t\t\tcomment_text_hash = ?\n\t\t\tWHERE\n\t\t\t\tcomment_id = ?d\n\t\t";
     if ($this->oDb->query($sql, $oComment->getText(), $oComment->getRating(), $oComment->getCountVote(), $oComment->getDelete(), $oComment->getPublish(), $oComment->getTextHash(), $oComment->getId())) {
         return true;
     }
     return false;
 }
 /**
  * Обновляет коммент
  *
  * @param  ModuleComment_EntityComment $oComment Объект комментария
  * @return bool
  */
 public function UpdateComment(ModuleComment_EntityComment $oComment)
 {
     $sql = "UPDATE " . Config::Get('db.table.comment') . "\n\t\t\tSET \n\t\t\t\tcomment_text= ?,\n\t\t\t\tcomment_text_source= ?,\n\t\t\t\tcomment_rating= ?f,\n\t\t\t\tcomment_count_vote= ?d,\n\t\t\t\tcomment_count_favourite= ?d,\n\t\t\t\tcomment_count_edit= ?d,\n\t\t\t\tcomment_date_edit= ?,\n\t\t\t\tcomment_delete = ?d ,\n\t\t\t\tcomment_publish = ?d ,\n\t\t\t\tcomment_text_hash = ?\n\t\t\tWHERE\n\t\t\t\tcomment_id = ?d\n\t\t";
     $res = $this->oDb->query($sql, $oComment->getText(), $oComment->getTextSource(), $oComment->getRating(), $oComment->getCountVote(), $oComment->getCountFavourite(), $oComment->getCountEdit(), $oComment->getDateEdit(), $oComment->getDelete(), $oComment->getPublish(), $oComment->getTextHash(), $oComment->getId());
     return $this->IsSuccessful($res);
 }
 /**
  * Обновляет коммент
  *
  * @param  ModuleComment_EntityComment $oComment    Объект комментария
  *
  * @return bool
  */
 public function UpdateComment(ModuleComment_EntityComment $oComment)
 {
     $sql = "UPDATE ?_comment\n\t\t\tSET \n\t\t\t\tcomment_text= ?,\n\t\t\t\tcomment_rating= ?f,\n\t\t\t\tcomment_count_vote= ?d,\n\t\t\t\tcomment_count_favourite= ?d,\n\t\t\t\tcomment_delete = ?d ,\n\t\t\t\tcomment_publish = ?d ,\n\t\t\t\tcomment_date_edit = CASE comment_text_hash WHEN ? THEN comment_date_edit ELSE ? END,\n\t\t\t\tcomment_text_hash = ?\n\t\t\tWHERE\n\t\t\t\tcomment_id = ?d\n\t\t";
     $bResult = $this->oDb->query($sql, $oComment->getText(), $oComment->getRating(), $oComment->getCountVote(), $oComment->getCountFavourite(), $oComment->getDelete(), $oComment->getPublish(), $oComment->getTextHash(), F::Now(), $oComment->getTextHash(), $oComment->getId());
     return $bResult !== false;
 }