Jump to content

[SOLVED] Multi ORDER BY Query


TRI0N

Recommended Posts

Okay I looked at the MySQL manuel for this and tried to sort some info by two keys..

 

$result4 = mysql_query("SELECT * FROM leaderboard WHERE (eventid = '$eventid') ORDER BY rounds_comp ASC, ORDER BY gross_score ASC LIMIT 10") ;

 

I bet it something so simple and dumb that I'll get hit in the head from behind.

 

MySQL site says to seperate them by a , but that doesn't seem to do the trick at all and neither do just a space.

 

Link to comment
https://forums.phpfreaks.com/topic/39611-solved-multi-order-by-query/
Share on other sites

$result4 = 'SELECT * FROM leaderboard WHERE eventid ORDER BY rounds_comp ASC, gross_score ASC LIMIT 10';

 

Oooops, does the 'WHERE evenid' bit work, should this read:

 

SELECT * FROM leaderboard WHERE eventid=1 ORDER BY rounds_comp ASC, gross_score ASC LIMIT 10

 

monk.e.boy

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.