0

I have selected_comments which is a tuple of id that I want to remove from the sqlite3 database. I tried this command (and other variations):

cursor.execute("DELETE FROM comments WHERE id IN (?)",(selected_comments)) 

But I get errors (for this specific command, I have: sqlite3.ProgrammingError: Incorrect number of bindings supplied.).

The size of the tuple is not fixed: it can go from 1 element to as much as you want.

Shan-x
  • 1,146
  • 6
  • 19
  • 44

0 Answers0