www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to manage order time of threads and messages in a BBS?

  1. #1
    Join Date
    Apr 2006
    Posts
    8

    Question How to manage order time of threads and messages in a BBS?

    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!

  2. #2
    Join Date
    Aug 2005
    Location
    The Garden State
    Posts
    5,634
    how do the messages relate to the threads? what foreign key/dependency relationships exist there? provide some table info plz
    Acceptable Use | SQL Forum FAQ | celery is tasteless | twitter

    celery is tasteless - currently needing some UI time

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles