cursor.fetchone() returns None even though a value exists
I am trying to figure out how to fetch a single value from a UserID and print it in the console. My current piece of code keeps returning "None" even though there is a value for Currency for the UserID I am searching. cursor.execute("SELECT Currency FROM ServerUsers WHERE USERID = %s" % (userid)) if cursor.fetchone(): a = cursor.fetchone() print(a)
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.