Skip to content
Snippets Groups Projects
Commit f4ab9ac4 authored by MAUGEZ Emeline's avatar MAUGEZ Emeline
Browse files

Correction ajout sql

parent 233f287c
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 (id_bec, nom_ingredient) VALUES (%s)", ("None", nom_ingredient,))
cursor.execute("INSERT INTO ingredient (id_bec, nom_ingredient) VALUES (%s, %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