Referring to a python variable in SQLite3 DELETE statement Referring to a python variable in SQLite3 DELETE statement tkinter tkinter

Referring to a python variable in SQLite3 DELETE statement


THe correct syntax for parameterized query is:

c.execute("DELETE FROM orders WHERE orders_id=?)", (orderToDelete,))

I believe you just need to call commit instead of reference it

conn.commit()