protected function modify(Moderate $moderate) { $q = $this->dao->prepare('UPDATE ' . $this->table() . ' SET USER_AUTHOR_ID = :userAuthorId, TYPE = :type, TYPE_ID = :typeId, MESSAGE = :message WHERE ID = :id'); $q->bindValue(':userAuthorId', $moderate->getUserAuthorId(), PDO::PARAM_INT); $q->bindValue(':type', $moderate->getType(), PDO::PARAM_INT); $q->bindValue(':typeId', $moderate->getTypeId(), PDO::PARAM_INT); $q->bindValue(':message', $moderate->getMessage()); $q->bindValue(':id', $moderate->id(), PDO::PARAM_INT); $q->execute(); $moderate->setId($this->dao->lastInsertId()); }