Jump to content

ORDER _BY_NOT_WORKING


RON_ron

Recommended Posts

What results are you getting vs what are you expecting to get?

 

Syntactically that line is fine, so your problem probably lies either with the data itself (ie trying to sort numbers stored as VARCHAR), or with how you're processing the results after the query (doing something that alters the order).

 

 

Are you sure you do not want to group by the category?

 

$query = "SELECT * FROM gift_db2 LEFT OUTER JOIN student_db ON gift_db2.category = student_db.name GROUP BY  gift_db2.category ORDER BY gift_db2.grade DESC";

 

Not knowing how it is not displaying right, just a shot in the dark.

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.