Click to See Complete Forum and Search --> : How to manage order time of threads and messages in a BBS?


luckybird
05-03-2006, 05:05 PM
In my BBS, I have two tables: thread and message.
Each has a field "time" which is a Timestamp type updated when the record is updated.

If I want to list the threads, I do it in the descending order of it's table's time.
However, when a message of that thread is updated or created, the corresponding thread's time should also be updated so that the most recent thread(the thread with the latest message) should be displayed first.

But how can I order the time of the thread according to the time of the message?

Could anybody give me some advice?

Thank you!

chazzy
05-03-2006, 09:40 PM
how do the messages relate to the threads? what foreign key/dependency relationships exist there? provide some table info plz