public function update(Contrat $contrat) { $query = $this->_db->prepare('UPDATE t_contrat SET numero=:numero, dateCreation=:dateCreation, prixVente=:prixVente, prixVenteArabe=:prixVenteArabe, avance=:avance, avanceArabe=:avanceArabe, modePaiement=:modePaiement, numeroCheque=:numeroCheque, nombreMois=:nombreMois, dureePaiement=:dureePaiement, echeance=:echeance, note=:note, updated=:updated, updatedBy=:updatedBy WHERE id=:id') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $contrat->id()); $query->bindValue(':numero', $contrat->numero()); $query->bindValue(':dateCreation', $contrat->dateCreation()); $query->bindValue(':prixVente', $contrat->prixVente()); $query->bindValue(':prixVenteArabe', $contrat->prixVenteArabe()); $query->bindValue(':avance', $contrat->avance()); $query->bindValue(':avanceArabe', $contrat->avanceArabe()); $query->bindValue(':modePaiement', $contrat->modePaiement()); $query->bindValue(':dureePaiement', $contrat->dureePaiement()); $query->bindValue(':numeroCheque', $contrat->numeroCheque()); $query->bindValue(':nombreMois', $contrat->nombreMois()); $query->bindValue(':echeance', $contrat->echeance()); $query->bindValue(':note', $contrat->note()); $query->bindValue(':updated', $contrat->updated()); $query->bindValue(':updatedBy', $contrat->updatedBy()); $query->execute(); $query->closeCursor(); }