In the last episode (Jul 09), CVIOG at UGA said:
> I have a fairly basic question: How do I sort
> numerically?  Normally when I query using "ORDER BY
> (field)", it orders by the first digit (i.e. 1, 10, 2,
> 21, 3, 32) rather than by number (1, 2, 3, 10, 21,
> 32).

Either alter the table to make that field an INTEGER column, or "ORDER
BY field+0" to force mysql to internally convert the field to a number
before sorting.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to