Answer the question
In order to leave comments, you need to log in
There is a syntax error, why?
In line
cursor.execute(f"SELECT id_user FROM users WHERE id_user = {people_id}")
Answer the question
In order to leave comments, you need to log in
f-strings have appeared in Python since version 3.6
But in any case, you should not use f-strings to form SQL queries
cursor.execute("SELECT id_user FROM users WHERE id_user = ?", (people_id,))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question