Skip to content
Snippets Groups Projects
Commit 233f287c authored by Adrien Chabod's avatar Adrien Chabod
Browse files

test sql

parent f161378c
No related branches found
No related tags found
1 merge request!1MAJ BDD + Data commande fonctionnel
......@@ -74,7 +74,7 @@ def mysql_get_bec_from_ingredient(id_ingredient: int):
def mysql_add_ingredient(nom_ingredient: str):
connection = connect_db()
cursor = connection.cursor()
cursor.execute("INSERT INTO ingredient ""(nom_ingredient) " "VALUES (%s)", (nom_ingredient,))
cursor.execute("INSERT INTO ingredient (id_bec, nom_ingredient) VALUES (%s)", ("None", nom_ingredient,))
connection.commit()
cursor.close()
connection.close()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment