Пример #1
0
 /**
  * @param CommentViewModel $model
  * @throws \Exception
  */
 private static function update(CommentViewModel $model)
 {
     $db = Database::getInstance('app');
     $query = "UPDATE comments SET comment_text = ?, date_time = ? WHERE id = ?";
     $result = $db->prepare($query);
     $result->execute([$model->getComment(), $model->getDateTime(), $model->getId()]);
 }