Answer the question
In order to leave comments, you need to log in
Update data in sqllite table in python?
There is sqlite table time. It has a column called Deleted. It contains a string value.
In Python, I read a string value and then compare it to some variable. If the value in the table is less than the variable, then write the value of the variable to the place of the value in the table.
Question: how to specify a Python variable in a sql query to overwrite?
c.execute('UPDATE time SET Deleted = date where rowid = 1')
Answer the question
In order to leave comments, you need to log in
c.execute('UPDATE time SET Deleted = ? where rowid = 1', ['hello world'])
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question