Commit 28051824 authored by Samuel Mejia Vallecilla's avatar Samuel Mejia Vallecilla
Browse files

correction initialisation de variable

parent d748a7c4
......@@ -93,6 +93,7 @@ def ajouterAbonne(conn,facteurPrix):
def nbPlacesDansParking(conn):
#affiche les parkings disponibles
cur = conn.cursor()
print("Vous pouvez consulter les places disponibles pour les parkings suivants: ")
sql = "SELECT * FROM parking"
cur.execute(sql)
......@@ -112,7 +113,6 @@ def nbPlacesDansParking(conn):
try:
cur = conn.cursor()
sql = f"SELECT SUM(NbreDeuxRouesCouvertes + NbreDeuxRouesAir + NbreCamionCouvertes + NbreCamionAir + NbreSimpleCouvertes + NbreSimpleAir) FROM parking WHERE parking.nom = '{nomParking}'"
cur.execute(sql)
nb = cur.fetchone()[0]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment