I have database with several tables in it. For sake of example I will simplify it and try to explain in detail.
One table is called Products, another called Brands, and the last one is called Categories.
As you might guessed each Product can have only one Category assigned. Also, each Product can have only one Brand assigned. These are the relationships.
So, on one page I have links with Brands as parameter that I pass to details page where I list all Products from specific Brand. On that page I also have filter by Categories that filters only products from selected Brand by that filter.
E.g. Sony -> then filter applied from drop down is dSLR -> Results of Sony brand dSLR camera products.
What I would like is to have that Categories filtered so that if Brand doesnt have specific category it doesnt even show on that drop down filter.
E.g. Categories are predefined as: dSLR, Video, Cell phone, Shoes
Sony have loads of Products, but doesnt make shoes, so I would like to have it excluded from that filter list on details page.
Hope you understood what I want here...
Any suggestion is more than welcomed :)