Nested Set Model Php library

2019-02-07 08:23发布

问题:

Hi I need to use the nested set model to mange product categories on my site. Does anyoune know of some good pre-built PHP libraries for handling nested sets in MySQL?

回答1:

You could try "Baobab", it's a library I recently released.

http://www.sideralis.org/baobab/



回答2:

It's a bit old, and could do with some refactoring, but I found a PHP Class "dbtree" on PHPClasses.org, which seems to do a fair job of it - http://www.phpclasses.org/package/2547-PHP-Manipulate-database-records-in-hierarchical-trees.html



回答3:

You could use a PHP ORM solution like Propel or Doctrine, they both support nested sets.