If it is character data, then it should order like this: 1 10 11 12 13 2 3 4 ...
To correct it, put a zero at the beginning of your single digits: 01 02 03 ... 10 11 12
That will order it correctly. Otherwise, change the number column to type int, and it should work just fine.
Hope that answers your question, and, yes, this is more of a MySQL question. ;-)
-Ben
John Taylor-Johnston wrote:
This is probably a MySQL question, and maybe an easy question, but I'm here to learn <|:)
When I order by number, it echoes 1,2,3,4,5,6,7,8,9,10 and hten jumps to 100...199 before it comes back to 11-19. Any way of ordering that differently?
$sql = 'SELECT * FROM '.$table.' ORDER BY number desc;';
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php