Show category hierarchy by product ID.
I have been asked to show all of the categories to which a product belongs. (PS3 database)
Querying the ps3_productcategories table, it is easy to establish which categories a product belongs to, but I would also like to see the hierarchy.
So, for example, Item number 1 may belong to 6 categories, two of which are parent categories, and the others are sub categories.
Hierarchical view may look something like this…
Category 1->Category 2->Category 3
Category 4 ->Category 5
Category 4 ->Category 6
In this instance,
Categories 1 and 4 are parent categories
Categories 5 and 6 are subordinate to Category 4
Category 3 is subordinate to Category 2 which is subordinate to category 1.
I’m not necessarily looking for a definitive answer, just some idea as to a method of approach.