MySQL order varchar alpha numeric
3 answers
This is called natural order sorting. Unfortunately, MySQL doesn't have such a sorting algorithm, so your safest bet would be to create a UDF to do it for you.
However, this question has an interesting answer:
Here's a quick solution:
SELECT title FROM table ORDER BY LENGTH(title), title
+1
source to share