Re: diplaying rows in numerical order with mysql
| From: | Mike Eheler | Date: | Mon, 15 Oct 2001 22:31:37 +0000 |
| Subject: | Re: diplaying rows in numerical order with mysql | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71149@lists.php.net to get a copy of this message | ||
If the field is a numerical field, then it should sort files. Otherwise, if it's a char/varchar/text/etc you'll need to change 1-9 to 01,02,03,04, etc.
The reason is that with text fields, it doesn't read the number as "19", it reads it as a "1" followed by a "9".
Mike
brett wrote:
I have a table for which I want to display rows from my database. The rows should be ordered 1,2,3...etc. Instead the order by clause displays 1,10,11,12,13,14,2,3,4...etc. Is their a way to display this in the normal human order? Brett