Re: [PHP-DB] Generating view of tree?

2003-03-28 Thread David T-G
Craig -- ...and then Craig Kohtz said... % ... % The script I've included works for a table named structure with the % following fields: Sounds interesting. Care to actually post the script? ;-) I'd like to see it. TIA HAND :-D -- David T-G * There is too much animal

Re: [PHP-DB] Generating view of tree?

2003-03-27 Thread Paul Burney
on 3/26/03 9:18 PM, Leif K-Brooks at [EMAIL PROTECTED] appended the following bits to my mbox: I have a table with a tree. Thing is, I need to generate a view of it like: Category Sub-category Sub-sub-category Another sub-category Another category Sub-category Any way to do

Re: [PHP-DB] Generating view of tree?

2003-03-27 Thread Randy
If I understand correctly and you have the data all in one table, you can just query all the data that goes into the report, sorted by categories, and output the data in a loop. This code will give you an ordered list indented and numbered by level. It's not perfect, but give you the idea...

Re: [PHP-DB] Generating view of tree?

2003-03-27 Thread olinux
--- Paul Burney [EMAIL PROTECTED] wrote: on 3/26/03 9:18 PM, Leif K-Brooks at [EMAIL PROTECTED] appended the following bits to my mbox: I have a table with a tree. Thing is, I need to generate a view of it like: Category Sub-category Sub-sub-category Another

Re: [PHP-DB] Generating view of tree?

2003-03-27 Thread olinux
Also just saw a new PEAR package posted that helps you work with nested sets. Haven't tried it yet. http://pear.php.net/package-info.php?package=DB_NestedSet olinux --- Paul Burney [EMAIL PROTECTED] wrote: on 3/26/03 9:18 PM, Leif K-Brooks at [EMAIL PROTECTED] appended the following bits to

RE: [PHP-DB] Generating view of tree?

2003-03-27 Thread Craig Kohtz
What's your table structure look like? I've done this in a couple projects. I use a parent child relationship. Usually I make it so you can expand and collapse the tree by clicking on a plus or minus, the script I've attached doesn't have this feature for simplicity sake. parent child