I've look into other questions regarding the same general idea (e.g. Python MySQL - SELECTs work but not DELETEs?), but no luck.
I have the following code:
cursor.execute("DELETE FROM ? WHERE source_id = ?", (tableName,sourceId) )
It fails with:
sqlite3.OperationalError: near "?": syntax error
However, this way it works:
cursor.execute("DELETE FROM %s WHERE source_id = %s" % (tableName,sourceId) )
The same query was tested directly in SQL terminal, so this is not a question of user rights or foreign keys.
I'm still rather fresh with some python sql issues, so thanks in advance.