From 217f3857254bcaff80a3f21472b637466916dc7e Mon Sep 17 00:00:00 2001 From: piair Date: Fri, 25 Aug 2023 20:43:37 +0200 Subject: [PATCH] no such column: nom --- modules/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/db.py b/modules/db.py index 2d7fdf1..3a8934d 100644 --- a/modules/db.py +++ b/modules/db.py @@ -19,7 +19,7 @@ def update_row(compte, points, mycursor, mydb): # update the value of last_pts for the table comptes def update_last(compte, points, mycursor, mydb): sql1 = f"UPDATE comptes SET last_pts = {points} WHERE compte = '{compte}';" - sql2 = f"select * from comptes where nom = '{compte}'" + sql2 = f"select * from comptes where compte = '{compte}'" sql3 = "INSERT INTO comptes (compte, last_pts,banned) VALUES ('{compte}', {points}, 0)" cmd = mycursor.execute(sql2) if len(list(cmd)) == 0: