I want to delete all subcategory from database automatically when I delete the parent category
|Added at||2016-12-30 07:12|
When a parent category(e.g., Architecture, Art and Culture) is dropped from the database, I want all subcategories under the parent category to be dropped from the database. I don't know how to write a query for this.
I am using PHP and MySQL database, the category and subcategory are two separate tables, the snapshots of the tables are given below.