Re: Re: Tree : more than one root

From: Date: Sun, 06 Oct 2002 17:38:57 +0000
Subject: Re: Re: Tree : more than one root
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9890@lists.php.net to get a copy of this message
<lists@kriesing.de> wrote : > Hi Bertrand, > > you can use more than one roots only for i.e. different users, if you > i.e. have an additional column name 'user_id' or whatever and you set > the option 'whereAddOn' with 'user_id=XX' > (of course the 'user_id' can also be 'tree_id' or whatever) so you > can manage multiple trees in one table but they have to differ in (at > least) one column, which you can determine freely, so the options > whereAddOn could also be like this for 2 rows: > 'whereAddOn' => 'tree_id=XX AND another_id=YY' > > but to have a single tree with multiple roots is not possible, that > wouldnt be a tree anymore :-) > > i hope that helps, if not please tell me how else the problem might > be constructed. Thanks but I don't think it's what I need. I don't want a new field, the class should know that a row where a parent is equal to 0 is a root ? Plus, your solution doesn't mix well with the add() method, at least for what I want to do. I'll try to make it work in an other way. I'll tell you if I succeed. Thanks, Bertrand Mansion Mamasam

« previous php.pear.dev (#9890) next »