Answer the question
In order to leave comments, you need to log in
Why do I have an error? programming error?
Hello everyone, why am I getting an error? What is the problem?
def rang(user_id):
connection = connect()
user_data = lox(user_id)
try:
with connection.cursor() as cursor:
result = cursor.execute(f'SELECT * FROM accounts WHERE uid={user_id}')
row = cursor.fetchone()
if user_data["plus"] >= 10:
user_data["rang"] += " sharingan"
cursor.execute(f'UPDATE accounts SET rang={user_data["rang"]} WHERE uid={user_id}')
connection.commit()
finally:
connection.close()
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