我正在尝试使用来自闭包表查询的数据创建一个无序列表。
查询的结果返回关系表的长度和用于对查询结果进行排序的面包屑:
downline length breadcrumbs
Jack Black 0 3,4
John Seventeen 1 3,4,101
Pieter Betteerd 1 3,4,20
Andre Van Klerk 1 3,4,21
Hans Beyers 2 3,4,21,68
Cobus Ventering 1 3,4,22
Phillipus Sonkis 1 3,4,23
Andriet Joubert 2 3,4,23,58
Daniel Calitzdorp 1 3,4,63
Roelf Serfontein 2 3,4,63,81
Anke Van Blerk 3 3,4,63,81,83
Hermanus Pieters 1 3,4,69
Heinrich Brough 2 3,4,69,72
我想将此结果输出到 html 中的无序列表,类似于:
<ul>
<li>
Jack Black
<ul>
<li>John Seventeen</li>
<li>Pieter Betteerd</li>
<li>Andre Van Klerk
<ul>
<li>Hans Beyers</li>
</ul>
</li>
<li>Cobus Ventering</li>
<li>Phillipus Sonkis
<ul>
<li>Andriet Joubert</li>
</ul>
</li>
<li>Daniel Calitzdorp
<ul>
<li>Roelf Serfontein
<ul>
<li>Anke Van Blerk</li>
</ul>
</li>
</ul>
</li>
<li>Hermanus Pieters
<ul>
<li>Heinrich Brough</li>
</ul>
</li>
</ul>
</li>
</ul>