Jump to content

ORDER BY not working correct?


spires

Recommended Posts

HI

 

I'm trying to get the highest number out of a database, I'm doing by:

SELECT * FROM csv_tempStored ORDER by temp DESC LIMIT 1

 

This should take every number in the temp column, and place the numbers in descending order.

 

However, I have all the following numbers in the temp column, but it keeps returning 9 instead of 21.

1, 2, 5, 6, 8, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 21  (they are in a random order in database)

 

Any ideas why it's returning 9 and not 21?

 

Thanks for your help

 

Link to comment
https://forums.phpfreaks.com/topic/203069-order-by-not-working-correct/
Share on other sites

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.