I need to use natural sorting with a MySQL result since it currently sorts my INT values as follows:
- 1
- 123
- 1256
- 22
- 231
[etc]
While I would need it to sort like
- 1
- 22
- 231
- 1256
I know of the "natsort" function, but it does not work for a MySQL query result. How can I sort (naturally), is it possible to do this within the query?
Thanks for the help!
EDIT: Example query $result = mysql_query("SELECT * FROM forums ORDER BY 'posts' DESC;");
Not entirely sure if my use of DESC there is valid, but it doesn't throw an error so it must be fine. Unfortunately, it seems changing DESC to ASC also has no effect...