I'm trying to build a category/subcategory class with php & MySQL.
I am stuck with the following problem:
I want to make a selection of all categories in an ordered way like it's showed in the picture below. The table structure I've made is:
Can I build an SELECT * statement which will select these categories in that order?