V
V
Vituya2021-07-02 12:15:31
Python
Vituya, 2021-07-02 12:15:31

Sqlite sqlite3.OperationalError: no such column: hello how to fix?

code:

connection = sqlite3.connect(db)
q = connection.cursor()
q.execute(f"UPDATE earn SET text = hello WHERE user_id={message.chat.id}")

error:

sqlite3.OperationalError: no such column hi

please help me fix this error

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-07-02
@Zoominger

Let's go like this:

connection = sqlite3.connect(db)
q = connection.cursor()
q.execute(f"UPDATE earn SET text = 'привет' WHERE user_id={message.chat.id}")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question