Ok I think I have the solution:
select t1.label as Parent, t2.label as Child from table t1
left join table t2
on t1.id=t2.idParent
order by t1.label, t2.label
This results in:
+----------------+
| Parent | Child |
+----------------+
| A | AA |
| A | AB |
| A | AC |
| AA | AAA |
| AA | AAB |
| AB | ABA |
| AAB | AABA |
| B | |
| C | CA |
| C | CB |
+----------------+
and so on ...
Now I have to find a php script that displays the correct tree ...
>> Stay informed about: [MySQL] hierachy problem ...