I need a function that will delete records from X number of tables with a common uniqud id.
For instance, I have 4 tables - photos, items, stats, equipment
each of them has a field called equipment_id (which is the primary key).
Now, I want to have one function where I pass the id and it deletes all in a table with that id. Those table names are just a sample, in the function I need to be able to pass the names.
Please remember, the Number of tables I will pass to the function will vary.