1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
public function updateSpeaker($email, Intervenant $int) {
if ($this->readSpeaker($email)!=null) {
$req= $this->bd->prepare("UPDATE intervenant SET biographie= :biographie
WHERE email_user=:email;");
$data = array(':biographie'=>$int->getBio(), ':email' => $email);
//var_export($this->speakersList());
$req2= $this->bd->prepare("UPDATE users SET nom= :nom,
prenom = :prenom,
adresse = :adresse,
regime_Alimentaire = :regime_Alimentaire,
pays = :pays,
allergies = :allergies,
taille_vetement = :taille_vetement,
tel = :tel,
organisation = :organisation,
photo = :photo
WHERE email_user=:email;");
$data1 = array(':nom'=>$int->getFirstName(),
':prenom'=>$int->getLastName(),
':adresse'=>$int->getAdress(),
':regime_Alimentaire'=>$int->getDiet(),
':pays'=>$int->getCountry(),
':allergies'=>$int->getAllergy(),
':taille_vetement'=>$int->getClothingSize(),
':tel'=>$int->getTelNumber(),
':photo' => $int->getPicture(),
':organisation'=>$int->getOrganization(),
':email' => $email
);
$req2->execute($data1);
//$req->execute($data);
echo "<br>Dans EventStorage : ";
var_export($this->readSpeaker($email));
echo "<br>Objet Intervenant dans EventStorage: <br>";
var_export($int);
return true;
}
return false;
} |
Partager