[PHP] Re: Getting data from table as a tree

2004-08-09 Thread pt2002
Hi Brian I was almost, almost, almost there :) but I was missing a bit of the logic. Thank you very much. You solve my present and future problems. Greetings pt2002 Brian Kell [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED] Well, first off, a little bit of formatting (line

[PHP] Re: Getting data from table as a tree

2004-08-08 Thread pt2002
Hi Take a look at this array. It represents a simple tree. I need that because the site i'm working on uses Smarty templates an there's a way to do output the tree using 'Smarty functions' $tpl-assign(tree,array(element=array(array(name= test1,

[PHP] Re: Getting data from table as a tree

2004-08-08 Thread Brian Kell
Well, first off, a little bit of formatting (line numbers added for clarity): 1 $tpl-assign(tree, 2 array( 3 element = array( 4 array( 5 name = test1, 6 element = array( 7 array( 8 name =

[PHP] Re: Getting data from table as a tree

2004-08-06 Thread Torsten Roehr
Pt2002 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi Sometimes, some clients just want a few scripts. sometimes to fix or to add some features in sites or apps already in production and that need to be something easy to install. kind of upload and go. They don't want a bundle

RE: [PHP] Re: Getting data from table as a tree

2004-08-06 Thread Ed Lazor
You could use the value of base dir variable as a point of reference rather than having to manually configure a path in the app. -Original Message- news:[EMAIL PROTECTED] Hi Sometimes, some clients just want a few scripts. sometimes to fix or to add some features in sites or apps

Re: [PHP] Re: Getting data from table as a tree

2004-08-06 Thread pt2002
Hi. Yes. I know that. I use pear's packages in some cases. This time is a cheap shared host running in safe mode, no ssh access. I don't even know if all needed packages are installed. Thank you very much. Greetings pt2002 Ed Lazor [EMAIL PROTECTED] escreveu na mensagem news:[EMAIL PROTECTED]

[PHP] Re: Getting data from table as a tree

2004-08-06 Thread Brian Kell
On Thu, 5 Aug 2004 11:24:57 +0100, Pt2002 [EMAIL PROTECTED] wrote: Hi I have a table like this id, pid, name. When a item has no parent, pid = 0. There is no limit in depth. 1, 0, Test 1 2, 1, Test 1.1 3, 1, Test 1.2 4, 2, Test 1.1.1 5, 1, Test 1.3 6, 3, Test 1.2.1 I need to read this table and

[PHP] Re: Getting data from table as a tree

2004-08-05 Thread Torsten Roehr
Pt2002 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi I have a table like this id, pid, name. When a item has no parent, pid = 0. There is no limit in depth. 1, 0, Test 1 2, 1, Test 1.1 3, 1, Test 1.2 4, 2, Test 1.1.1 5, 1, Test 1.3 6, 3, Test 1.2.1 I need to read this

[PHP] Re: Getting data from table as a tree

2004-08-05 Thread pt2002
Thank you for your suggestion. I've had already browse pear classes but didn't want to use them. I've found some tips and now I can show the tree but I also need to have all the data in an array and that's the problem now. Greetings pt2002 Pt2002 [EMAIL PROTECTED] escreveu na mensagem

[PHP] Re: Getting data from table as a tree

2004-08-05 Thread Torsten Roehr
Pt2002 [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Thank you for your suggestion. I've had already browse pear classes but didn't want to use them. I've found some tips and now I can show the tree but I also need to have all the data in an array and that's the problem now.

[PHP] Re: Getting data from table as a tree

2004-08-05 Thread pt2002
Hi Sometimes, some clients just want a few scripts. sometimes to fix or to add some features in sites or apps already in production and that need to be something easy to install. kind of upload and go. They don't want a bundle of scripts with dependencies, they don't want configuring paths, etc,