Re: Tree : more than one root

From: Date: Sun, 06 Oct 2002 14:24:01 +0000
Subject: Re: Tree : more than one root
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-9883@lists.php.net to get a copy of this message
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. wolfram On Sunday 06 October 2002 15:21, you wrote:
Hi Wolfram, Could you tell me if it is possible using your Tree class and Dynamic_DBNested to have more than one root (and more than one tree) in a single table ? Like this:
ID      LEFT        RIGHT       PARENT
1       1           2           0
2       1           4           0
3       2           3           2
See what I mean ? Bertrand Mansion Mamasam
-- Wolfram ... translating template system ... http://sourceforge.net/projects/simpletpl ... authentication system .... http://sf.net/projects/auth

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