Hi Larry,

Thanks for the help. I was just coming to a similar conclusion last night after reading the warnings on this thread about querying the database recursively. I guess my test data with 7 posts is not a rigorous simulation. :-)

I've looked through the posts on the PHP general list going back about 3-6 weeks and can't find the thread you speak of. I searched by your name assuming that you posted into the thread and searched by the string "recursive" and "recursion". If you could steer me to it in some other way (subject of the thread or subject word) I would appreciate it, but only if it is not too much trouble. I can take a go at it now that the basic approach is carved out: query once, recurse the data in PHP.

Thanks,

Ben

On Jun 30, 2006, at 12:05 AM, Larry Garfield wrote:



I've written such a system before more than once. You do the sorting in SQL, and then traverse the data recursively in PHP to build the tree. It's a single SQL query. Check the archives for this list for about 3-4 weeks ago,
I think.  We were just discussing it, and I showed some basic code
examples. :-)

--
Larry Garfield                  AIM: LOLG42
[EMAIL PROTECTED]               ICQ: 6817012

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to