public function update(Commission $commission){ $query = $this->_db->prepare(' UPDATE t_commission SET titre=:titre, commissionnaire=:commissionnaire, montant=:montant, etat=:etat, updated=:updated, updatedBy=:updatedBy WHERE id=:id') or die (print_r($this->_db->errorInfo())); $query->bindValue(':id', $commission->id()); $query->bindValue(':titre', $commission->titre()); $query->bindValue(':commissionnaire', $commission->commissionnaire()); $query->bindValue(':montant', $commission->montant()); $query->bindValue(':etat', $commission->etat()); $query->bindValue(':updated', $commission->updated()); $query->bindValue(':updatedBy', $commission->updatedBy()); $query->execute(); $query->closeCursor(); }