public function add(ContratEmploye $contratEmploye){ $query = $this->_db->prepare(' INSERT INTO t_contratemploye (dateContrat, dateFinContrat, prixUnitaire, unite, nomUnite, nomUniteArabe, nombreUnites, prixUnitaire2, unite2, nomUnite2, nomUniteArabe2, nombreUnites2, traveaux, traveauxArabe, articlesArabes, total, employe, idSociete, idProjet, created, createdBy) VALUES (:dateContrat, :dateFinContrat, :prixUnitaire, :unite, :nomUnite, :nomUniteArabe, :nombreUnites, :prixUnitaire2, :unite2, :nomUnite2, :nomUniteArabe2, :nombreUnites2, :traveaux, :traveauxArabe, :articlesArabes, :total, :employe, :idSociete, :idProjet, :created, :createdBy)') or die (print_r($this->_db->errorInfo())); $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->bindValue(':created', $contratEmploye->created()); $query->bindValue(':createdBy', $contratEmploye->createdBy()); $query->execute(); $query->closeCursor(); }
public function add(ContratEmploye $contratEmploye) { $query = $this->_db->prepare(' INSERT INTO t_contratEmploye ( dateContrat, prixUnitaire, nombreUnites, total, employe, idProjet, created, createdBy) VALUES (:dateContrat, :prixUnitaire, :nombreUnites, :total, :employe, :idProjet, :created, :createdBy)') or die(print_r($this->_db->errorInfo())); $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->bindValue(':created', $contratEmploye->created()); $query->bindValue(':createdBy', $contratEmploye->createdBy()); $query->execute(); $query->closeCursor(); }