public function add(Projet $projet) { $query = $this->_db->prepare(' INSERT INTO t_projet ( nom,numeroTitre,emplacement,superficie,description,dateCreation,status,createdBy,created, idSociete) VALUES (:nom,:numeroTitre,:emplacement,:superficie,:description, :dateCreation,:status,:createdBy,:created, :idSociete)') or die(print_r($this->_db->errorInfo())); $query->bindValue(':nom', $projet->nom()); $query->bindValue(':numeroTitre', $projet->numeroTitre()); $query->bindValue(':emplacement', $projet->emplacement()); $query->bindValue(':superficie', $projet->superficie()); $query->bindValue(':description', $projet->description()); $query->bindValue(':dateCreation', $projet->dateCreation()); $query->bindValue(':status', $projet->status()); $query->bindValue(':createdBy', $projet->createdBy()); $query->bindValue(':created', $projet->created()); $query->bindValue(':idSociete', $projet->idSociete()); $query->execute(); $query->closeCursor(); }