Welcome Guest, Not a member yet? Register   Sign In
How to Create Multi level category hierarchy ( Category Tree )
#2

[eluser]PhilTem[/eluser]
Have a look at Joe Celko's Nested-Sets approach via google. There are a lot of php-classes out there that can provide basic operations for nested sets.
With your approach it works fine if you have a small amount of data in your database and very less deep-trees (at most from the root to a second node so that you have 3 levels)
I am writing a version easily manageable for CodeIgniter at the moment. Have a look here

https://svn.ignitedco.de/icf/branches/co..._Model.php

and for the parent model here

https://svn.ignitedco.de/icf/branches/co..._Model.php

[edit]
PS: My provided Nested_set_Model isn't yet finished. It only supports some basic operations, but you can have a look at it and get inspired Wink Furthermore, I think all necessary queries are also written as pure SQL commands, so one can reconstruct the CI-like db-queries
[/edit]


Messages In This Thread
How to Create Multi level category hierarchy ( Category Tree ) - by El Forum - 01-24-2012, 04:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB