public function addComment(Comment $comment) { $result = $this->db->prepare("\n\t\t\tINSERT INTO comment(comment_date, content, user_id, product_id)\n\t\t\tVALUES(?, ?, ?, ?)\n\t\t"); $result->execute([$comment->getCommentDate(), $comment->getContent(), $comment->getUserId(), $comment->getProductId()]); }