I have 3 tables:
stores
categories
store_categories
store_categories is a mapping table and has two fields (store_id and category_id).
store_id is the same as the ID field in stores. Now whenever I need to delete a store in stores, then I also need to delete the store_id in store_categories that matches the ID in stores.
But how? What's the right syntax for this?
Any help is greatly appreciated.