I have a flat list of pages in a mySQL Table.
ID | Tab index | Page Name | parent
Pages can be children of another page, specified by the "parent" property.
The whole list is sorted using the "Tab index" int column.
Can anybody think of a way to query this list so that
Items are ordered by Tabindex
Items that are children of another item are grouped behind the parent item, and ordered by their tabindices (optional)?
My mySQL knowledge doesn't reach that deep.
This is an existing data structure and can't be changed.
Thanks in advance for any input.