public function update(Caisse $caisse) { $query = $this->_db->prepare(' UPDATE t_caisse SET nom=:nom,dateCreation=:dateCreation WHERE id=:id') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $caisse->id()); $query->bindValue(':nom', $caisse->nom()); $query->bindValue(':dateCreation', $caisse->dateCreation()); $query->execute(); $query->closeCursor(); }
public function update(Caisse $caisse) { $query = $this->_db->prepare(' UPDATE t_caisse SET type=:type, dateOperation=:dateOperation, montant=:montant, designation=:designation, destination=:destination, updated=:updated, updatedBy=:updatedBy WHERE id=:id') or die(print_r($this->_db->errorInfo())); $query->bindValue(':id', $caisse->id()); $query->bindValue(':type', $caisse->type()); $query->bindValue(':dateOperation', $caisse->dateOperation()); $query->bindValue(':montant', $caisse->montant()); $query->bindValue(':designation', $caisse->designation()); $query->bindValue(':destination', $caisse->destination()); $query->bindValue(':updated', $caisse->updated()); $query->bindValue(':updatedBy', $caisse->updatedBy()); $query->execute(); $query->closeCursor(); }