My goal is to make the list of parent categories from a nested category the easiest way. Say, if I had a website that sold many different products, one of which is quad Pentium. The function that I can display on my web page is as follows:
Electronics> Computers> Processors> Intel> Intel Quad Core
The table of categories that I had in mind:
ID, parent_id, Description
Running a recursive process on parent_id seems tedious. Is there a preferred way to do this? Thanks.
source
share