Commit 6e93b8bc authored by Antoine Kryus's avatar Antoine Kryus
Browse files

add correction python membre asso

parent 4601ce08
......@@ -4,7 +4,7 @@ import psycopg2
from tabulate import tabulate
def display(conn):
def execute(conn):
cur = conn.cursor()
column_names = []
......@@ -21,9 +21,18 @@ def display(conn):
print (tabulate(data_rows, headers=column_names))
idAssociation = input("Entrez l'id de l'Association dont vous voulez connaitre les membres. \n")
idAssociation = input("Entrez l'id de l'Association dont vous voulez connaitre les membres : \n-> ")
sql = "SELECT M.numeroCIN,M.nom,M.prenom,M.statut,I.role FROM Inscription I JOIN MembreDeLUniversite M ON I.numeroCIN=M.numeroCIN WHERE I.association = " + idAssociation + ";"
print(sql)
print("\n Voici les membres de l'association : \n")
cur.execute(sql)
#conn.commit()
data_rows = []
column_names = [desc[0] for desc in cur.description]
for row in cur:
data_rows.append(row)
print (tabulate(data_rows, headers=column_names))
......@@ -51,7 +51,7 @@ while option != 0:
elif option == 7:
nbBilletPourUneSeance.nbBilletPourUneSeance(conn)
elif option == 8:
membreAssociation.membreAssociation(conn)
membreAssociation.execute(conn)
elif option == 9:
informationsMembreExterieur.execute(conn)
elif option == 0:
......
Markdown is supported
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