no such column: nom

This commit is contained in:
piair 2023-08-25 20:43:37 +02:00
parent 6efc77c512
commit 217f385725
1 changed files with 1 additions and 1 deletions

View File

@ -19,7 +19,7 @@ def update_row(compte, points, mycursor, mydb):
# update the value of last_pts for the table comptes # update the value of last_pts for the table comptes
def update_last(compte, points, mycursor, mydb): def update_last(compte, points, mycursor, mydb):
sql1 = f"UPDATE comptes SET last_pts = {points} WHERE compte = '{compte}';" 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)" sql3 = "INSERT INTO comptes (compte, last_pts,banned) VALUES ('{compte}', {points}, 0)"
cmd = mycursor.execute(sql2) cmd = mycursor.execute(sql2)
if len(list(cmd)) == 0: if len(list(cmd)) == 0: