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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.