Hi,
I have two fields 'mod_date' TIMESTAMP(14), and 'thread_ID' TINY_INT(10).
The values in mod_date are unique and the values in thread_ID can be the same.
I wan't to order the rows in the resultset by mod_date and thread_ID. Where thread_ID doesn't have to be in ASC or DESC order, but rows with equal values for thread_ID must be listed by eachother(form a group).
These 'groups' must be ordered by the most recent mod_date represented in it.
I tried to use the following queries:
SELECT thread_ID, UNIX_TIMESTAMP(mod_date) as mod_date, FROM table ORDER BY mod_date DESC, thread_ID;
SELECT thread_ID, UNIX_TIMESTAMP(mod_date) as mod_date, FROM table ORDER BY thread_ID, mod_date DESC;
I also tried to make the thread_ID field a CHAR and a BLOB field.
I realy hope somone can give a solution for this.
Thanks in advance.