Answer the question
In order to leave comments, you need to log in
ValueError: parameters are of unsupported type?
I need to pull the user's balance from the table
cursor.execute("SELECT balance FROM users WHERE id=?", plusid)
cursor.execute("SELECT balance FROM users WHERE id=?", plusid)
ValueError: parameters are of unsupported type
cursor.execute("SELECT balance FROM users WHERE id=?", (plusid))
Answer the question
In order to leave comments, you need to log in
I watched questions on sqlite on Habré, and there the person also substituted one value, but the problem was not with this. In general, I figured it out. You need to put the value in brackets and put a comma after it.
cursor.execute("SELECT balance FROM users WHERE id=?", (plusid,))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question