F
F
Fizl2021-07-02 14:30:44
Python
Fizl, 2021-07-02 14:30:44

How to insert a value into a specific column in a database?

I need to insert a True value into the succes column in the task database.
Tried writing something like the code below but it didn't work

cur.execute(f"INSERT INTO task(succes) WHERE task_name == {task_name_} VALUES(?)", (True,))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Altry, 2021-07-02
@Fizl

cur.execute('UPDATE task SET succes = ? where task_name = ?', (True,  task_name_))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question