示例#1
0
 public function update(Operation $operation)
 {
     $query = $this->_db->prepare('UPDATE t_operation SET date=:date, montant=:montant WHERE id=:id') or die(print_r($this->_db->errorInfo()));
     $query->bindValue(':date', $operation->date());
     $query->bindValue(':montant', $operation->montant());
     $query->bindValue(':id', $operation->id());
     $query->execute();
     $query->closeCursor();
 }
 public function update(Operation $operation)
 {
     $query = $this->_db->prepare('UPDATE t_operation SET date=:date, dateReglement=:dateReglement, compteBancaire=:compteBancaire,
     montant=:montant, modePaiement=:modePaiement, observation=:observation, 
     numeroCheque=:numeroCheque, updated=:updated, updatedBy=:updatedBy WHERE id=:id') or die(print_r($this->_db->errorInfo()));
     $query->bindValue(':id', $operation->id());
     $query->bindValue(':date', $operation->date());
     $query->bindValue(':dateReglement', $operation->dateReglement());
     $query->bindValue(':compteBancaire', $operation->compteBancaire());
     $query->bindValue(':observation', $operation->observation());
     $query->bindValue(':montant', $operation->montant());
     $query->bindValue(':modePaiement', $operation->modePaiement());
     $query->bindValue(':numeroCheque', $operation->numeroCheque());
     $query->bindValue(':updated', $operation->updated());
     $query->bindValue(':updatedBy', $operation->updatedBy());
     $query->execute();
     $query->closeCursor();
 }