List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:February 22 2006 4:09pm
Subject:Re: "Nested Set Model" or "modified preorder tree traversal" mySQL/PHP
code wanted
View as plain text  
Daevid,

>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".

The reason there's not a drop-in module may be that adding the layers 
implementing
such generality would slow performance. There is a nested set example 
for MySQL 5 at 
http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html

PB

-----

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'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=tutorial-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
>
> 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!!
>
> 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.
>
> 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.
>
> TIA.
>
> D.Vin
>
>
>   


-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 268.0.0/266 - Release Date: 2/21/2006

Thread
"Nested Set Model" or "modified preorder tree traversal" mySQL/PHP code wantedDaevid Vincent22 Feb
Re: "Nested Set Model" or "modified preorder tree traversal" mySQL/PHPcode wantedPeter Brawley22 Feb