From 4da91f22ca6a2ff09e47320b361d30612697fbf6 Mon Sep 17 00:00:00 2001 From: "ishak jmilou.ishak" Date: Tue, 17 Dec 2024 15:03:21 +0100 Subject: [PATCH] changed --- src/Python/flask/web/app.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Python/flask/web/app.py b/src/Python/flask/web/app.py index 32bdbe3..267a6e9 100644 --- a/src/Python/flask/web/app.py +++ b/src/Python/flask/web/app.py @@ -59,7 +59,9 @@ def move(): db_connection = get_db() cursor = db_connection.cursor() - cursor.execute("INSERT INTO command (direction) VALUES (%s)", (direction,)) + sql = "INSERT INTO command (command) VALUES (%s)" + value = direction + cursor.execute(sql, (value,)) db_connection.commit() cursor.close() db_connection.close()