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.