troubleshooting Question

Function Needed

Avatar of edvinson
edvinsonFlag for United States of America asked on
PHP
6 Comments2 Solutions282 ViewsLast Modified:
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.

Thanks!!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 6 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros