#instead of hard coading SQLite how can i assign variables to it: see message for better explanation

8 messages · Page 1 of 1 (latest)

winter roseBOT
#
Code Formatting

When sharing code with the community, please use the correct formatting for ease of readability.

Example

```py
YOUR CODE HERE
```

Those are back ticks not single quotes, typically the key above TAB

dire turtle
#
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

marble sun
#

Just put a variable instead of the name...

dire turtle