This Post Has Been Viewed 97 Times Since Fri Feb 29, 2008 12:01 pm Posted By lucas with 1 replies
POST# 452
Posted On: Fri Feb 29, 2008 12:01 pm
i want to learn how to create nested sets in php. i have a menu i want to make and have categories and subcategories.
how do i do that?
Mon Feb 11, 2008 6:15 pm
1
hostman
Reply #1041
if i were you, you can download
Joe Celko Nested Sets
http://www.phpclasses.org/browse/package/1374.html
This class is meant to manage tree database structure using Jeo Celko's nested sets approach.
You can add node with 7 queries, delete a node with subnodes with 4 queries and move node with 11 queries.
The number of queries per action does not depend on the number of sub-nodes, so it is a scalable solution.