Re: Re: Tree : more than one root
| From: | Wolfram Kriesing | Date: | Sun, 06 Oct 2002 17:47:11 +0000 |
| Subject: | Re: Re: Tree : more than one root | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9891@lists.php.net to get a copy of this message | ||
Bertrand Mansion wrote:
<lists@kriesing.de> wrote :the add-method of course needs the data for this row passed to it too! is it possible that you have the root and simply start below that? -- Wolfram ... translating template system ... http://sourceforge.net/projects/simpletpl ... authentication system .... http://sf.net/projects/authHi 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: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.'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.