public function add(Cheque $cheque) { $query = $this->_db->prepare(' INSERT INTO t_cheque ( dateCheque,numero,designationSociete,designationPersonne,montant,statut,url, idProjet, idSociete, compteBancaire, createdBy, created) VALUES (:dateCheque, :numero, :designationSociete, :designationPersonne, :montant, :statut, :url, :idProjet, :idSociete, :compteBancaire, :createdBy, :created)') or die(print_r($this->_db->errorInfo())); $query->bindValue(':dateCheque', $cheque->dateCheque()); $query->bindValue(':numero', $cheque->numero()); $query->bindValue(':designationSociete', $cheque->designationSociete()); $query->bindValue(':designationPersonne', $cheque->designationPersonne()); $query->bindValue(':montant', $cheque->montant()); $query->bindValue(':statut', $cheque->statut()); $query->bindValue(':url', $cheque->url()); $query->bindValue(':idProjet', $cheque->idProjet()); $query->bindValue(':idSociete', $cheque->idSociete()); $query->bindValue(':compteBancaire', $cheque->compteBancaire()); $query->bindValue(':createdBy', $cheque->createdBy()); $query->bindValue(':created', $cheque->created()); $query->execute(); $query->closeCursor(); }