#unable to execute making a sqlite table

10 messages · Page 1 of 1 (latest)

violet seal
#

!format

subtle flareBOT
#
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

violet seal
#
import sqlite3
from user import User

conn = sqlite3.connect('users.db')
c = conn.cursor

#creates the fields for table 
c.execute("""CREATE TABLE users (
            name text,
            password text,
            id integer
            )""")
            
conn.commit()


conn.close()
sullen dune
#

You didn't call cursor

violet seal
#

c is cursor

#

so c.execute calls it right?

sullen dune
#

no you're missing ()

violet seal
#

thats twice now

#

ffc