Avoid the booking of full fligths.
[Project_webapp.git] / includes / reservations.php
index 0416bd5af660a159d5777a2029ebf2723021282a..0d32077720b46e5c5271580c0ad8461c44a3833b 100644 (file)
@@ -17,7 +17,7 @@ $oDateNow = new Datetime($date_now);
 global $connection;
 $sql_pquery = "select RESERVATIONS.NumVol as NumVol, VilleD, DateD, VilleA, DateA, RESERVATIONS.Classe, NbPlaces, round(CoutVol*CoeffPrix*NbPlaces, 2) as Prix
                from RESERVATIONS join VOLS on RESERVATIONS.NumVol = VOLS.NumVol
-               join DEFCLASSES on DEFCLASSES.NumVol = VOLS.NumVol and RESERVATIONS.Classe = DEFCLASSES.Classe
+               join DEFCLASSES on DEFCLASSES.NumVol = RESERVATIONS.NumVol and DEFCLASSES.NumVol = VOLS.NumVol and DEFCLASSES.Classe = RESERVATIONS.Classe
                           where NumCl = ? and DateD > ?
                order by DateD, NumVol, Prix";
 $connection->prepare_query($sql_pquery);