Commit bbb9899d authored by Antoine Kryus's avatar Antoine Kryus
Browse files

add Ajouter une donnée : correction python et requête

parent 3c13ecc2
......@@ -38,8 +38,9 @@ def add(conn):
attributes = attributes + data_to_insert[attribute]
if attribute != len(data_to_insert)-1:
attributes = attributes + ", "
choice = input("\nAjouter une autre donnée ? (o/n) ")
sql = "INSERT INTO " + table + " VALUES " + attributes + ";"
sql = "INSERT INTO " + table + " VALUES (" + attributes + ");"
cur.execute(sql)
conn.commit()
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