#instead of hard coading SQLite how can i assign variables to it: see message for better explanation
8 messages · Page 1 of 1 (latest)
user1 = User('miller','pass',2)
def insert_name(user):
with conn:
c.execute("INSERT INTO users VALUES (:name, :password, :id)", {'name': user.name, 'password': user.password, 'id': user.id})
the function is called so the data 'miller' 'pass' and '2' are added as a new row in my table
instead of say miller for name
how can put a variable there that i can ask the user for an input
Just put a variable instead of the name...
rlly??