Answer the question
In order to leave comments, you need to log in
Why doesn't it add sqlite3 to the table?
Why didn't you add it?
sql.execute(f"INSERT INTO properties VALUES (?,?,?,?)", ( serverid , '9999999999999999',False,False))
db = sqlite3.connect('Core.db')
sql = db.cursor()
sql.execute("""CREATE TABLE IF NOT EXISTS properties (
serverid INT,
MUsers BIGINT,
TERMS boolean,
Blocked boolean
)""")
db.commit()
Answer the question
In order to leave comments, you need to log in
You didn't provide all the code, so there is no exact answer!
This is how it works (and sql is usually called a query string, not a cursor):
import sqlite3
conn = sqlite3.connect('Core.db')
cursor = conn.cursor()
cursor.execute("""CREATE TABLE IF NOT EXISTS properties (
serverid INT,
MUsers BIGINT,
TERMS boolean,
Blocked boolean
)""")
serverid = 1
cursor.execute(f"INSERT INTO properties VALUES (?,?,?,?)", ( serverid , '9999999999999999',False,False))
conn.commit()
conn.close()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question