public function publishComment(Commentaire $comment) { date_default_timezone_set("Europe/Brussels"); $date = date(DateTime::ATOM); $query = $this->_db->prepare("INSERT INTO `comments` VALUES(:comment_id, :dino_id, :user_id, :comment, :date, :response_comment_id)"); $query->bindValue(':comment_id', $comment->getCommentId()); $query->bindValue(':dino_id', $comment->getDinoId()); $query->bindValue(':user_id', $comment->getUserId()); $query->bindValue(':comment', $comment->getComment()); $query->bindValue(':date', $date); $query->bindValue(':response_comment_id', $comment->getResponseCommentId()); return $query->execute(); }