Jump to content

MySql will not sort values correctly?


champbronc2

Recommended Posts

OK I have a table, and I want to sort it by who has the most visits.

 

I do this:

 

Select * From users Where referer = '' ORDER BY visits DESC;

 

So I'd have someone with 9 visits and another person with 86 visits.

 

But it lists 9 before 86...

 

It seems to be sorting by the first digit from the left, when I need to to sort by the greatest number..

 

And like it'd list 9 before 65 or 54 and so on.

 

How can I fix this?

Link to comment
https://forums.phpfreaks.com/topic/127024-mysql-will-not-sort-values-correctly/
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.