public function update(Commande $commande){ $query = $this->_db->prepare( 'UPDATE t_commande SET idFournisseur=:idFournisseur, idProjet=:idProjet, dateCommande=:dateCommande, numeroCommande=:numeroCommande, designation=:designation, updated=:updated, updatedBy=:updatedBy WHERE id=:id') or die (print_r($this->_db->errorInfo())); $query->bindValue(':id', $commande->id()); $query->bindValue(':idFournisseur', $commande->idFournisseur()); $query->bindValue(':idProjet', $commande->idProjet()); $query->bindValue(':dateCommande', $commande->dateCommande()); $query->bindValue(':numeroCommande', $commande->numeroCommande()); $query->bindValue(':designation', $commande->designation()); $query->bindValue(':updated', $commande->updated()); $query->bindValue(':updatedBy', $commande->updatedBy()); $query->execute(); $query->closeCursor(); }