Expand|Select|Wrap|Line Numbers
- cat_id, cat_name, cat_parent
- 1 furniture null
- 2 electrical null
- 3 tvs 2
- 4 desks 1
- 5 corner desks 4
- 6 sony tvs 3
- 7 wardrobe 1
My question is, how can I easily return a list of all items sorted alphabetically by category & subcategory? Is there a away to recurse through the categories just with sql, so it finds the parent category for each item and sorts by that?
I want to keep the category table in this format so it is dynamic and as many sub categories as possible can be added.
Thanks for any help!
Andy.