Answer the question
In order to leave comments, you need to log in
Where does "No such column" come from in SQLite3?
There is this block of code:
import sqlite3
sql.execute("""CREATE TABLE IF NOT EXISTS users (
login TEXT,
password TEXT,
сash INT
)""")
db.commit()
db = sqlite3.connect('server.db')
sql = db.cursor()
def enter():
for i in sql.execute("SELECT cash FROM users"):
print(i)
enter()
Traceback (most recent call last):
File "sql.py", line 10, in <module>
enter()
File "sql.py", line 7, in enter
for i in sql.execute("SELECT cash FROM users"):
sqlite3.OperationalError: no such column: cash
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