可能重复:
PHP / MySQL 构建树菜单
我需要在两级构建菜单之间获取数据。
ID | Parent    | Name    | 
 1 | 0         | Cat1    | 
 2 | 1         | SubCat1 | 
 3 | 0         | Cat2    | 
 4 | 3         | SubCat2 | 
 5 | 4         | SubCat3 | 
 6 | 3         | SubCat4 | 
 7 | 3         | SubCat5 |
Level 1: Cat1 and Cat2
Level 2: SubCat1, SubCat2 and Subcat4
Level 3: SubCat3 and SubCat5
- 第一类
- 子类 1
 
- 类别 2
- 子类 2
- 子类 3
- 子类 5
 
- 子类 4
 
- 子类 2
我想要 2 级和 3 级菜单列出数据。我如何在 2,3 行之间调用?