I am getting the error while trying to insert values.
This is for storing userid and password of users in sqlite3 database.
import sqlite3, hashlib
conn = sqlite3.connect('user.db')
a = input("Enter id:")
b = input("Enter password:")
b = str.encode(b)
b = hashlib.sha224(b).hexdigest()
conn.execute("insert into user(id,pass) values(%s, %s);"%(a,b))
print("Done")
Create statement was:
CREATE TABLE user(id varchar[50], pass varchar[50])
When I try to enter values A(id) and a (password), I get the following error:
conn.execute("insert into user(id,pass) values(%s, %s);"%(a,b))
sqlite3.OperationalError: no such column: A