Re: [DBnestedSet] how to output only one tree by passing a
| From: | Daniel Khan | Date: | Tue, 13 Jan 2004 13:28:15 +0000 |
| Subject: | Re: [DBnestedSet] how to output only one tree by passing a | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-10145@lists.php.net to get a copy of this message | ||
Hi Olaf,
Olaf krüger wrote:
I've create an additional Field "TREE_ID" in the nodes-casestable cause I want to output different tree's for different . How can I get only the nodes that are associate to a passed TREE_ID ? I've tried to use the "getAllNodes()"- method by using the $addSQL-parameter, but I didn't find a possibility to add an statement like "where TREE_ID=3".I would recommend to simply use a rootnode for each separate tree. A rootnode with it's children is a fully independent Nested Set, so RootID is very much the same as your Tree_ID - but supported by the class :) Then you can simply do a getBranch() to get one separate tree. +- Root1 (RootID 1) | +- Root2 (RootID 2) | +- Root3 (RootID 3) HTH -- Daniel Khan