public function exists(Commentaire $commentaire) { $q = $this->_db->prepare('SELECT COUNT(*) FROM commentaire WHERE (voiture = :voiture AND technicien = :technicien AND date = :datecommentaire)'); $q->bindValue(':voiture', $commentaire->voiture(), PDO::PARAM_STR); $q->bindValue(':technicien', $commentaire->technicien(), PDO::PARAM_INT); $q->bindValue(':datecommentaire', $commentaire->datecommentaire(), PDO::PARAM_STR); $q->execute(); return (bool) $q->fetchColumn(); }