table : category
| id + category_name + parent_category_id |
| 1 | Flower | 0 |
| 2 | Wall Decor | 0 |
| 3 | Stylish Living| 0 |
| 4 | Mug | 0 |
| 5 | Sun Flower | 1 |
| 6 | Balsam | 1 |
i try to list data with sort order parent category first and then sub-category.
Flower
flower > Sun Flower
flower > Balsam
Wall Decor
Stylish Living
Mug
as i try i can’t get like above , below is what i get, flower > Sun Flower and flower > Balsam should under Flower .
Flower
Wall Decor
Stylish Living
Mug
flower > Sun Flower
flower > Balsam
really appreciate if someone can give some idea or solution.
…is the best I can come up with for the results you want. See it working.