我有一张这样的表:
-------------------------------------------------
| id | description | parent_id | cost
--------------------------------------------------
| 1 | Radiology | NULL | 0.00
| 2 | Lab Tests | NULL | 0.00
| 3 | Normal Radiology | 1 | 0.00
| 4 | Resonance | 1 | 100.00
| 1100 | Cerebral Resonance| 4 | 200.00
| 1900 | Blood Tests | 2 | 10.00
| 2044 | Calcium | 2 | 50.00
---------------------------------------------------
Run Code Online (Sandbox Code Playgroud)
我需要生成这种输出:
Radiology
-->Normal Radiology
-->Resonance
-->Cerebral Resonance with contrast …
Run Code Online (Sandbox Code Playgroud)