I have faced error problem as my if statement don't work. I have an existing database by sqlite3, using python 3, i have a column in my db named "borrow".
My "borrow" by default has data '0' stored.
Thus, i did an if else statement like:
c.execute("SELECT borrow FROM adminData where name = user_input")
conn.commit()
borrowR = c.fetchall()
if borrowR == "0":
print("New")
else:
print("Exists")
When i run my program, nothing shows. Nothing is printed out. What is wrong here? In my if else statement.
Aucun commentaire:
Enregistrer un commentaire