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

Tu

parent 484ba7bd
Branches
No related tags found
1 merge request!1MAJ BDD + Data commande fonctionnel
......@@ -95,8 +95,9 @@ def mysql_get_composition_for_machine(commande: tuple):
connection = connect_db()
cursor = connection.cursor()
for k in commande:
cursor.execute("SELECT machine.id_bec, quantite FROM ingredient INNER JOIN machine ON ingredient.id_bec = machine.id_bec WHERE ingredient.id_ingredient = %s", (k[1],))
data+=cursor.fetchall()
cursor.execute("SELECT machine.id_bec FROM ingredient INNER JOIN machine ON ingredient.id_bec = machine.id_bec WHERE ingredient.id_ingredient = %s", (k[1],))
bec=cursor.fetchone()
data.append((bec, k[2]))
cursor.close()
connection.close()
return data
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment