Re: creating a threaded message system--sorting messages

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, June 29, 2006 9:11 am, Ben Liu wrote:
> I'm trying to present the messages to the users in
> threaded order rather than flat. I'm having a lot of trouble figuring
> out how to sort the posts so they appear in the correct threaded
> order. I don't think I can do this purely with a SQL query.

You can.

The thing to do is to store the "pre-order traversal" as a "threaded
tree" in your database.

If you Google for those terms along with SQL, you should find some
articles that will help you tame this beast.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux