예제 #1
0
    public function update(Cheque $cheque)
    {
        $query = $this->_db->prepare(' UPDATE t_cheque SET 
		dateCheque=:dateCheque,numero=:numero,designationSociete=:designationSociete,designationPersonne=:designationPersonne,montant=:montant,statut=:statut,idProjet=:idProjet
		WHERE id=:id') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':id', $cheque->id());
        $query->bindValue(':dateCheque', $cheque->dateCheque());
        $query->bindValue(':numero', $cheque->numero());
        $query->bindValue(':designationSociete', $cheque->designationSociete());
        $query->bindValue(':designationPersonne', $cheque->designationPersonne());
        $query->bindValue(':montant', $cheque->montant());
        $query->bindValue(':statut', $cheque->statut());
        //$query->bindValue(':url', $cheque->url());
        $query->bindValue(':idProjet', $cheque->idProjet());
        $query->execute();
        $query->closeCursor();
    }