ok,
i want to create a list of categories.
the list should only display results of categories that contain at least one record.
my categorey table is:
id : level1 : level2 : level3
1 : car : honda : civic
2: car : honda : prelude
3 : car : ford : escort
4 : boat : fishing : boston whaler
5: boat : speed : cigerette
Product table is:
id : name : brand : category
1 : shiftter : thrust : |1|2|
2 : visor : some : |3|4|
3 : pedal : thrust : |5|2|3|
now if i pass the Brand = "thrust' to the query, i want a list of:
Car:
- Honda
--Civic
--Prelude
Boat:
- Speed
--cigerette
currently, it is showing all categories. how do i select distinct records to show only the categories that have products associated wiht the brand being passed.
i hope this makes sense.
thanks in advance