How do you sort a tree stored using the nested set model?

前端 未结 8 662
不思量自难忘°
不思量自难忘° 2021-01-31 20:32

When I refer to nested set model I mean what is described here.

I need to build a new system for storing \"categories\" (I can\'t think of better word for it) in a user

8条回答
  •  野趣味
    野趣味 (楼主)
    2021-01-31 20:52

    Sorting Nested Sets has no limits and it's not difficult. Just sort by the LEFT bower (anchor, whatever) and it's done. If you have a LEVEL for each node, you can also pull-off correct indentation based on the Level.

提交回复
热议问题