SQLite Forum

DELETE FROM database WHERE rowid
The parameters argument in [Cursor.execute](https://docs.python.org/3.8/library/sqlite3.html#sqlite3.Cursor.execute) is a sequence of all the parameters that will be bound. It worked in the first example because a string is a sequence of single characters, and you gave it a single character string for a query with a single parameter.

In the second example you're giving it a query with 1 parameter, but a string which is a sequence of 2 characters. So you've got 2 things to bind, but only one place for them.

Correct use would be to have the single parameter you want to bind be in a 1 element list or tuple

`c.execute("DELETE FROM adressen WHERE rowid = ?;", (id,))`


`c.execute("DELETE FROM adressen WHERE rowid = ?;", [id])`

(And also, id should be converted to an integer since it's a rowid, but it works ok here)