public function update(ContratEmploye $contratEmploye)
    {
        $query = $this->_db->prepare(' UPDATE t_contratEmploye SET 
		dateContrat=:dateContrat, nombreUnites=:nombreUnites, prixUnitaire=:prixUnitaire, 
		total=:total, employe=:employe, idProjet=:idProjet WHERE id=:id') or die(print_r($this->_db->errorInfo()));
        $query->bindValue(':id', $contratEmploye->id());
        $query->bindValue(':dateContrat', $contratEmploye->dateContrat());
        $query->bindValue(':prixUnitaire', $contratEmploye->prixUnitaire());
        $query->bindValue(':nombreUnites', $contratEmploye->nombreUnites());
        $query->bindValue(':total', $contratEmploye->total());
        $query->bindValue(':employe', $contratEmploye->employe());
        $query->bindValue(':idProjet', $contratEmploye->idProjet());
        $query->execute();
        $query->closeCursor();
    }
示例#2
0
	public function update(ContratEmploye $contratEmploye){
    	$query = $this->_db->prepare(
    	'UPDATE t_contratemploye SET dateContrat=:dateContrat, dateFinContrat=:dateFinContrat, 
    	nombreUnites=:nombreUnites, prixUnitaire=:prixUnitaire, unite=:unite, nomUnite=:nomUnite, nomUniteArabe=:nomUniteArabe, 
    	nombreUnites2=:nombreUnites2, prixUnitaire2=:prixUnitaire2, unite2=:unite2, nomUnite2=:nomUnite2, nomUniteArabe2=:nomUniteArabe2, 
    	traveaux=:traveaux, traveauxArabe=:traveauxArabe, articlesArabes=:articlesArabes, total=:total, employe=:employe, idSociete=:idSociete, idProjet=:idProjet 
    	WHERE id=:id')
		or die (print_r($this->_db->errorInfo()));
		$query->bindValue(':id', $contratEmploye->id());
		$query->bindValue(':dateContrat', $contratEmploye->dateContrat());
        $query->bindValue(':dateFinContrat', $contratEmploye->dateFinContrat());
        $query->bindValue(':prixUnitaire', $contratEmploye->prixUnitaire());
        $query->bindValue(':unite', $contratEmploye->unite());
        $query->bindValue(':nomUnite', $contratEmploye->nomUnite());
        $query->bindValue(':nomUniteArabe', $contratEmploye->nomUniteArabe());
        $query->bindValue(':nombreUnites', $contratEmploye->nombreUnites());
        $query->bindValue(':prixUnitaire2', $contratEmploye->prixUnitaire2());
        $query->bindValue(':unite2', $contratEmploye->unite2());
        $query->bindValue(':nomUnite2', $contratEmploye->nomUnite2());
        $query->bindValue(':nomUniteArabe2', $contratEmploye->nomUniteArabe2());
        $query->bindValue(':nombreUnites2', $contratEmploye->nombreUnites2());
        $query->bindValue(':traveaux', $contratEmploye->traveaux());
        $query->bindValue(':traveauxArabe', $contratEmploye->traveauxArabe());
        $query->bindValue(':articlesArabes', $contratEmploye->articlesArabes());
		$query->bindValue(':total', $contratEmploye->total());
		$query->bindValue(':employe', $contratEmploye->employe());
        $query->bindValue(':idSociete', $contratEmploye->idSociete());
		$query->bindValue(':idProjet', $contratEmploye->idProjet());
		$query->execute();
		$query->closeCursor();
	}