Reputation: 145
I know this is a repeated question and I've looked at all of them however I cant see what I'm doing wrong.
this is my sqlite3 code:
cursor.execute('''DELETE FROM dates WHERE (Date, Start, End) VALUES( ? , ? , ? );''',
(fulldaterem, starttimehour2, endtimehour2))
and get the error:
sqlite3.OperationalError: near ",": syntax error
where am I going wrong?
Upvotes: 0
Views: 930
Reputation: 1123400
A DELETE
statement doesn't take any VALUES
section. See the DELETE
documentation:
You need to build a boolean expression for your WHERE
clause:
cursor.execute(
'''DELETE FROM dates
WHERE Date=? AND Start=? AND End=?''',
(fulldaterem, starttimehour2, endtimehour2))
Upvotes: 3