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

Member Avatar

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