Welcome Guest, Not a member yet? Register   Sign In
Nested lists with infinite depth
#2

[eluser]Cro_Crx[/eluser]
I had to do the same thing for a work project where there was unlimited nesting of categories, so you could have a parent of a parent of a parent etc. I ended up using the same solution as yourself #2. It's the most efficient way to do this. Most of the time the database will be the slowest part of your application, so doing 1 call rater than multiple will be quicker, the function to change the flat structure into a tree isn't very long or processor heavy either.

I don't have my helper with me here (it's at work) but it's not overly complex. You can create a simple function using the PHP example here ==> http://www.tommylacroix.com/2008/09/10/p...ng-a-tree/.


Messages In This Thread
Nested lists with infinite depth - by El Forum - 02-05-2010, 04:06 PM
Nested lists with infinite depth - by El Forum - 02-05-2010, 07:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB