Answer the question
In order to leave comments, you need to log in
How to print column value from sqlite in python?
Used this code
cur.execute("SELECT balance from users where userid = ?", (message.from_user.id,))
Answer the question
In order to leave comments, you need to log in
You just need to write the zero index of the array, this will be the value. for example
cur.execute("SELECT balance from users where userid = ?", (message.from_user.id,))
balance = cur.fetchone()
balance = balance[0]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question