Searching for the best PHP nested sets class (PEAR class excluded)

后端 未结 6 1947
不知归路
不知归路 2020-12-09 06:51

I\'m looking for a PHP (with MYSQL) nested sets class with all needed functions. For example:

createLeftNode, createRightNode,createRootNode, createSubNode,deleteNod

6条回答
  •  长情又很酷
    2020-12-09 07:18

    There is something new around: http://www.sideralis.org/baobab/


    Old and outdated answer. The library is not supported anymore.

    I used the nstrees library "buggzzy" posted (http://www.edutech.ch/contribution/nstrees/index.php) for a project where I had to give the user the possibility to create and edit the organisational chart of his company.

    I like the "Modified Preorder Tree Traversal" algorithm very much but it seems to me that the nstree library is slow. In my case I have to iterate recursively down the tree. Maybe it's something else in my script which is slow.

    Anyways I'm also still looking for an alternative and I recently checked the PEAR website and found a tree library there too: http://pear.php.net/package/Tree

    The PEAR library didn't seem as comprehensive as NSTREE but I assume it could be more performant.

    An article which helped me a lot with this question: Storing Hierarchical Data in a Database

提交回复
热议问题