how can i delete a record from multiple tables

Iam having category id in category table,and in orders table.If iam deleting in that id in category table at a time it should delete in orders table also how can i do this can anyone help me.

Thanks in advance

Recommended Answers

All 3 Replies

Member Avatar for diafol

See cereal's link and pay attention to CASCADE. This won't work automatically unless you have set up FKs - perhaps that's obvious?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.