public function add(Commentaire $comm) { //if($comm->getAddable()) //{ $q = $this->_db->prepare("INSERT INTO commentaire SET dateCom=NOW(), contenu=:contenu, note=:note , idModele=:car, idClient=:auteur"); $q->bindValue(':car', $comm->getIdModele(), PDO::PARAM_INT); $q->bindValue(':auteur', $comm->getIdClient()); $q->bindValue(':contenu', $comm->getContenu()); $q->bindValue(':note', $comm->getNote(), PDO::PARAM_INT); $q->execute(); //} //else echo " conditions non valides. voir trigger_error"; }