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
| function updateReservationVl($db, $dateDebutModif, $heureDebutResVl, $dateFinModif, $heureFinResVl, $lieuModif, $idUtModif, $idVehiculeModif, $statut, $idResVl){
$sql = "UPDATE resavl SET dateDebutModif = :dateDebutModif,
heureDebutResVl = :heureDebutResVl,
dateFinModif = :dateFinModif,
heureFinResVl = :heureFinResVl,
lieuModif = :lieuModif,
idUtModif = :idUtModif,
idVehiculeModif = :idVehiculeModif,
statut = :statut,
WHERE idResVl = :idResVl
";
$req = $db->prepare($sql);
$req->bindValue(':dateDebutModif',$dateDebutModif,PDO::PARAM_STR);
$req->bindValue(':heureDebutResVl',$heureDebutResVl,PDO::PARAM_STR);
$req->bindValue(':dateFinModif',$dateFinModif,PDO::PARAM_STR);
$req->bindValue(':heureFinResVl',$heureFinResVl,PDO::PARAM_STR);
$req->bindValue(':lieuModif',$lieuModif,PDO::PARAM_STR);
$req->bindValue(':idUtModif',$idUtModif,PDO::PARAM_STR);
$req->bindValue(':idVehiculeModif',$idVehiculeModif,PDO::PARAM_INT);
$req->bindValue(':idResVl',$idResVl,PDO::PARAM_INT);
$req->bindValue(':statut',$statut,PDO::PARAM_STR);
$req->execute();
}
function updateReservationVlBis($db, $dateDebutModif, $heureDebutResVl, $dateFinModif, $heureFinResVl, $lieuModif, $idUtModif, $idVehiculeModif, $statut, $idResVl)
{
$sql = "UPDATE resavl SET dateDebutModif = $dateDebutModif,
heureDebutResVl = $heureDebutResVl,
dateFinModif = $dateFinModif,
heureFinResVl = $heureFinResVl,
lieuModif = $lieuModif,
idUtModif = $idUtModif,
idVehiculeModif = $idVehiculeModif,
statut = $statut,
WHERE idResVl = $idResVl
";
$db->query($sql);
} |
Partager