Answer the question
In order to leave comments, you need to log in
What is the gist of sqlite3 python error?
Hello, I'm learning to work with databases through python, so I'm a beginner. I did everything the same as in the tutorial, but an error is generated: the table is not created. With all this, the database is in the same folder as the python code. I would be grateful if you point out my mistakes and, if possible, give an example of a competent code.
import sqlite3
with sqlite3.connect('bot.db') as db:
sql = db.cursor()
sql.execute("""INSERT INTO users(chat_id, username, full_name) VALUES (?, ?, ?)""", (12312, 'lol', 'Иван Иванов'))
db.commit()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question