I’m using the following script to delete rows from a database table:
id = event.source.id
if system.gui.confirm(“Are you sure you want to delete the selected Program?”):
system.db.runPrepUpdate(“DELETE FROM fw_6870101_recipes WHERE fw_6870101_recipes_ndx = ?”, [id])
So far it works perfect.
Now I need to be able to change the table name (fw_6870101_recipes). The customer wants a simple text field to enter another table name.
Can I use a placeholder as table name and how would the script look for this?