I want to search for a user in a table by the user id from discord, but I can't provide the id in mysql. I get an error You have an error in your SQL syntax; But I don't understand what's wrong.
@commands.command()
async def balance(self, ctx):
create_balance(ctx)
query = ("SELECT UserID FROM userdata "
"WHERE UserID = %s")
user_id = ctx.message.author.id
cur.execute(query, (user_id))
for (UserID, score) in cur:
print(UserID,score)