Jump to content

Archived

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

Ephialtes

MySQL Order By?

Recommended Posts

Basically, how come when i do an ordinary order by, using ORDER BY permission DESC and i have 10 entries, it goes like so:

 

9

8

7

6

5

4

3

2

1

10

 

How can i get it to put the 10 on the top? Is MySQL just stupid about counting?

Share this post


Link to post
Share on other sites

Firstly, sorry for posting in the wrong area, i keep doing it by mistake, and secondly, that would muck up my system. Is there no other way of doing it?

Share this post


Link to post
Share on other sites

How is your field defined? If is it a character string, that how numbers are sorted when they are treated as text. Define it as an int and it should sort fine.

 

Ken

Share this post


Link to post
Share on other sites

×

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.