I have to write some PHP backend code for a threaded message board. The db
has a message table, and each message has a parent id.

Does anyone have any advice for someone whos never done this in PHP?

I'm currently thinking that I write function that takes a db row as an
argument, and initially, it is passed the root node of the whole tree. It is
also probably passed a string variable.

The first thing it will do is append the code for itself to the string.

Then it will query the DB for all its children (with an order by post
timestamp), and for every child, it will call itself on that child row.

Am I on the right track? (I've done simmilar things in C++, just not in


Publish technical articles @ skilledwords.com and get 100% of the

Reply via email to