I use for my component a categories table like the categories table from Joomla. So the structure has also the columns from the Joomla categories table: - Table jos_my_categories structure: id, parent_id, lft, rgt, level, title ...
Normally is use for the default sort order: $query->order('c.lft'); which gives a result as example (only categories titles):
- beta
- charly
- alpha
- beta
- alpha
- beta
- zulu
- sierra
- charly
- alpha
- charly
- alpha
- beta
- charly
But required is alternate also a tree result in alpbabetical order (also for the sub categories - in all levels):
- alpha
- alpha
- beta
- sierra
- zulu
- charly
- beta
- alpha
- beta
- charly
- charly
- alpha
- beta
- charly
How must in this case be the query?