Answer the question
In order to leave comments, you need to log in
How to format and add data to SQLITE?
There is such a table:
cur.execute("""CREATE TABLE IF NOT EXISTS users(
id_records INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,
id_chat INT,
id_user INT,
username TEXT,
having_ban INT DEFAULT 0,
having_kick INT DEFAULT 0);""")
more_users = [(1, 1, '1'), (1, 1, '2')]
cur.executemany("INSERT INTO users VALUES(NULL, ?, ?, ?);", more_users)
cur.executemany("INSERT INTO users VALUES(NULL, ?, ?, ?, 0, 0);", more_users)
Answer the question
In order to leave comments, you need to log in
You can specify the specific fields you want to set.
INSERT INTO users (id_chat, id_user, username) VALUES (1, 1, '1');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question