View Single Post
Old 02-17-2011, 10:43 PM  
Jakez
Confirmed User
 
Jakez's Avatar
 
Industry Role:
Join Date: Jan 2004
Location: oddfuturewolfgangkillthemall!!!!!!!
Posts: 5,656
MySQL question: how do you correctly sort by 2 columns?

I'm trying to sort the order by 2 INT columns but it doesn't seem to recognize the 2nd sort.

Everything in Google says to do it like this:
Quote:
SELECT id,name,views FROM posts ORDER BY id ASC, views DESC LIMIT 0,14
But that gives me this, which is only sorting the ID's and not the views also:
__________________
[email protected] - jakezdumb - 573689400

Killuminati
Jakez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote