Answer the question
In order to leave comments, you need to log in
Error pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; how do I fix it?
how to fix this error? Below is the code. pymysql.err.ProgrammingError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'limit=1 WHERE uid=621252537' at line 1")
def abonus(user_id,money):
connection = connect()
with connection.cursor() as cursor:
result = cursor.execute(F'SELECT * FROM accounts WHERE uid={user_id}')
panos = cursor.fetchone()
if result == 1:
panos["limit"] += 1
cursor.execute(f'UPDATE accounts SET limit={panos["limit"]} WHERE uid={user_id}')
connection.commit()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question