Sort order question

I often need to sort a set or subset of records in a table in an arbitrary way and am confused about how to get the order I need using a separate sort field.

What I would like to do is sort like this:

1
2
3
4
5
6
7
8
9
10
11
12

Mysql, of course does this:

1
10
11
12
2
3
etc.

If I enter a zero before single digits, MYSQL inconveniently deletes it when inserting it into the table.

Any way I can get it to sort like we learned to count in kindergarten?

The only option I have found is to use letters, but then I run into the same problem if I am sorting more than 26 items.

–Kenoli

No it doesn’t. Unless you’ve defined the sort order column as character instead of numeric. Try changing the column type.