RE: "Nested Set Model" or "modified preorder tree traversal"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Brawley on the mySQL list pointed me at: 
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html 

Which uses mySQL 5's procedures and such.
I haven't implemented this yet, but it appears to be what I wanted for the
most part.

> -----Original Message-----
> From: Curt Zirzow [mailto:czirzow@xxxxxxxxx] 
> Sent: Tuesday, February 21, 2006 10:58 PM
> To: php-general@xxxxxxxxxxxxx
> Subject: Re:  "Nested Set Model" or "modified preorder 
> tree traversal"
> 
> On Tue, Feb 21, 2006 at 09:38:53PM -0800, Daevid Vincent wrote:
> > I've been searching the web for the past few hours trying 
> to find a simple
> > drop-in class or functions to implement "Nested Set Model" 
> or "modified
> > preorder tree traversal".
> 
> I actually fell in love of this method of doing trees when I
> discovered it about a year ago, when researching a fast way to do
> a parent child retrieval.
> 
> > 
> > I've found several tutorials and related links:
> > 
> >   
> http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
> >   http://www.sitepoint.com/article/hierarchical-data-database
> >  
> > 
> http://www.zend.com/zend/tut/tutorial-ferrara2.php?article=tut
> orial-ferrara2
> > &id=3453&open=1&anc=0&view=1
> >   http://simon.incutio.com/archive/2003/06/19/storingTrees
> >   http://istherelifeafter.com/joecelko.html
> >   http://www.codeproject.com/cs/database/Trees_in_SQL_databases.asp
> 
> oh i have to add some of these to my list, i didn't have a couple
> of them.
> 
> > 
> > I even found some outdated PEAR DB_NestedSet class from 
> 2003 that seemed way
> > to overly complicated. And some other PHP4_Mysql3MPTTA 
> class on PHP Classes
> > that was equally complicated and written for ancient PHP4 
> and mySQL 3!!
> 
> yeah, i kind of got that feeling with the PEAR class as well, i
> think it was designed that way to be as flexible as possible. I'm
> not familiar with the other class, i tend to avoid anything from
> PHP Classes.
> 
> > 
> > Hasn't anyone else done this before (recently)? 
> > Did everyone just write their own code every time?
> > Anyone have some easy to use code that allows for:
> > Add, delete, update/rename, select, show tree, bread crumb 
> display, etc.
> 
> It would be nice to have a tool to manage the functionality. There
> will always be the issue with any common tool that is built for
> this purpose is how do you relate the table that defines the nested
> with the table that actually holds the data.
> 
> I believe that why the PEAR and other classes you came across
> seemed to be overly complicated.  I have found that it is easier to
> write my own management (as awful as that sounds) for the job at
> hand.
> 
> > 
> > I use PHP 5.0.5 and mySQL 5.0.18, so ideally it would take 
> advantage of all
> > the optimizations and bells & whistles of those more modern 
> versions.
> 
> 5.0.5? you mentioned that php4 is ancient, 5.0.5 is more ancient
> than php4.. infact 5.0.x is rather dead.
> 
> PHP 4.4.2 - Released Jan 13 2006
> php 5.1.2 - Released Jan 12 2006
> PHP 5.0.5 - Released Sept 6 2005
> 
> I wouldn't expect any more releases of 5.0.x version.
> 
> 
> Curt.
> -- 
> cat .signature: No such file or directory
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux