SQL ORDER BY thing1 ASC, thing2 DESC not working
Posted
by William
on Stack Overflow
See other posts from Stack Overflow
or by William
Published on 2010-03-14T23:31:58Z
Indexed on
2010/03/14
23:35 UTC
Read the original article
Hit count: 264
it puts item1 down as DESC for some reason.
edit:
$sql_result = mysql_query("SELECT post, name, trip, Thread, sticky FROM (SELECT MIN(ID) AS min_id, MAX(ID) AS max_id, MAX(Date) AS max_date FROM test_posts GROUP BY Thread ) t_min_max INNER JOIN test_posts ON test_posts.ID = t_min_max.min_id WHERE Board=".$board." ORDER BY sticky ASC, max_date DESC", $db);
http://prime.programming-designs.com/test_forum/viewboard.php?board=0&page=3
© Stack Overflow or respective owner