【发布时间】:2010-06-29 13:35:32
【问题描述】:
我有一个带有 categoryId、name 和 parentId 的表。我想用类似结构的父子树构建一个html列表
我的桌子是这样的
------------------------------------------------------------------
id categoryId parentId categoryName SortSeq
------------------------------------------------------------------
1 438044691 NULL test 1
2 438044692 438044691 test item one 2
3 438044693 438044691 test item two 3
1 438044701 NULL testOne 4
2 438044702 438044701 testOne item one 5
3 438044703 438044701 testOne item two 6
1 438044709 NULL testTwo 7
2 438044710 438044709 testTwo item one 8
3 438044711 438044709 testTwo item two 9
结构也可以有子子类别项。但在这个例子中它只是一个。
如果您认为问题不完整,我很乐意为您提供更多信息。
非常感谢。
【问题讨论】:
-
是否可以修改表结构、添加新列等?