Using a mysql setup with the following tables:
categories | CATEGORY_ID
categories_sub | CATEGORY_ID | SUB_CATEGORY_ID
In practical terms, the menus output nesting like this:
Products
Desks
Tables
Workstations
Chairs
Which would be represented by the following SQL entries in categories_sub
, assuming appropriate records in categories
:
desks01 | products01
tables01 | desks01
workstations01 | desks01
chairs01 | products01
All of that being said, is it possible to create a single MySQL query that pulls all of the children of products01 no matter how far nested they are under sub, sub-sub-categories, sub-sub-sub-categories? If so, how would it be written?