Hmm...I'll have to check on that when I get back in the office tomorrow. I believe the results are being output this way because of this:
ORDER BY (fieldname + 0)
Which, for some reason, allowed numbers like the following to be sorted like this:
00
000
1
2
3
This might have something to do with the sort order being somewhat abnormal. I'll post again in the morning.