I have a column in a mysql table with values as follows: 3 3 4 2 5 1 6 7 8 9 10 11 12 13.
When I issue the query:
SELECT col FROM table ORDER BY col ASC;
I get this 1 10 11 12 13 2 3 3 4 5 6 7 8 9.
Is there a way to make mysql return the results in natural order, as show below?
1 2 3 3 4 5 6 7 8 9 10 11 12 13.
I know I can use natsort() in php to do it, but for my purpose, I need the sorting to be done at the mysql level.
Any ideas?
When I issue the query:
SELECT col FROM table ORDER BY col ASC;
I get this 1 10 11 12 13 2 3 3 4 5 6 7 8 9.
Is there a way to make mysql return the results in natural order, as show below?
1 2 3 3 4 5 6 7 8 9 10 11 12 13.
I know I can use natsort() in php to do it, but for my purpose, I need the sorting to be done at the mysql level.
Any ideas?