Re: Hierarchical List Question

From: Date: Tue, 14 Nov 2000 00:16:24 +0000
Subject: Re: Hierarchical List Question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-25061@lists.php.net to get a copy of this message
This is definitely cool, but can be really slow when your trees get really big. This is where you want to let your database do some of the work for you. When sorting really big trees you can go from 100's or even 1000's of milliseconds when sorting the tree in PHP down to like 10-15ms because there is no looping going on. I love performance gains like that! Allows for really cool stuff that is a pain when sorting, like.... -select the parents from Node X -Find the path from node X to node Y -Find all the ending leaves -display all the children from node Y Steve Nelson http://www.SecretAgents.com Tools for Fusebox Developers Philip Hallstrom wrote: > > Check out: http://www.phpbuilder.com/tips/item.php?id=132 > > It's exactly what you want. > > In article <B635C11B.252E7%clarencek@ifurnishing.com> you write: > > > >I'm trying to do write some code that will look through a table with an ID > >and Parent_ID and create a hierarchical list of the results. > > > >ex. > > > >+ Item 1 > > - subItem 1.1 > > - subItem 1.2 > > - subItem 1.3 > > - subItem 1.4 > > - subsubItem 1.4.1 > > - subsubItem 1.4.2 > > - subsubItem 1.4.3 > >+ Item 2 > > - subItem 2.1 > > > >etc. > > > >I've only seen one example on the web - a Javascript menu building function. > >Does anyone know any other resources that might have some code that would do > >the above. Any help would be greatly appreciated. > > > >Thanks very much. > > > >-- > > > >Clarence > > > >-> clarencek@ifurnishing.com > > > > > > > >-- > >PHP General Mailing List (http://www.php.net/) > >To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > >For additional commands, e-mail: php-general-help@lists.php.net > >To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net --

« previous php.general (#25061) next »