Hi
Is it possible to select a group of two distinct columns, and then order by a third column?
Here is my problem....
I have a forum, where each board has a number. Within each board are a number of threads - each thread has it's own number, starting at 0 for the first thread of each board.
Each posting has a timestamp.
Here is a sample of the data column headings....
board | thread | depth | subject | message | time
So - basically, there could be
10 | 1 | 1 | subject here | another message | 20040505191159
10 | 2 | 1 | subject here | another message | 20040505191160
10 | 1 | 2 | | another message | 20040505191160
So - as you can see, I cannot order by timestamp alone - as I would be left with showing postings within threads, rather than just the latest threads that have been posted to.
I cannot order by "thread", as board 10 will have a thread number 1 - as will board 20 have thread number 1
I cannot order by "board" as a board has many threads.
Really - If I could select the rows where "thread" AND "board" were both distinct, and then order by the time, that would be great.
Any ideas, anyone?
PS - MySQL 4.0.18
Joe