Re: [PHP] mySQL SQL query

2004-08-06 Thread Brian Kell
On Thu, 5 Aug 2004 08:48:01 -0500, Jay Blanchard [EMAIL PROTECTED] wrote: [snip] [snip] A quickie for you: How do I say SELECT * FROM mytable where the sum of this field + this field + this field x I can't say I've done one of those before. [/snip] How many SQL queries can a PHP list handle in

[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-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 =