Avoid the booking of full fligths.
[Project_webapp.git] / lib / utils.php
index 5ab99b599fa7301b864bec195c1c717917f3efa7..f8867162fb601c03aef41246a8c47015e729191a 100644 (file)
@@ -98,7 +98,7 @@ function get_client_id($email)
 function nb_booked($client_id, $flight_id, $class_name)
 {
     global $connection;
-    $sql_pquery = "select SUM(NbPlaces) from RESERVATIONS where NumCl = ? and NumVol = ? and Classe = ?";
+    $sql_pquery = "select sum(NbPlaces) from RESERVATIONS where NumCl = ? and NumVol = ? and Classe = ?";
     $connection->prepare_query($sql_pquery);
     $connection->prepared_query_bind_param("iss", array($client_id, $flight_id, $class_name));
     $connection->run_prepared_query();