A proper table design would prevented this problem.
The first rule of relational database design:
- You should never store more than one piece of data in a single field.
Your fields are storing two pieces of information. A name and a number.
As a result, the number is being treated by MySQL as a string. And as a string, the *number* is being sorted one character at a time, placing 10 with 1.
If you were to split the number into it's own integer field, you could have MySQL sort the results based on the string first, and then the number. That way it would sort it by the entire number, not one char at a time.
I recommend you read this article. It describes the three basic rules of database design. Will help you avoid these sort of problems.