I had to think for a minute as to what I was trying to say when I was writing the subject line, but hopefully this'll clear it up:
What's the easiest way to force sorting in a particular order when you have odd entries like this?
111ss
112ss
113ss
11ss <- this should be above 111ss
121ss
122ss
123ss
12ss <- this should be above 121ss
I know the quick answer: put a "0" zero in front of all the smaller numbers to equalize it. Unfortunately, that's just not an option because it's "11ss", not "011ss".
My only idea is to create another field in the db for sorting, a numerical field like 1, 2, 3, 4, etc. so it'll be forced to sort in that order, but the tricky part is not having to rewrite the entire table everytime sorting is changed for all the entries under the changed number. Like, if there's 500 entries, and I change number 5, I don't want to have to rewrite all the fields for 6-500. Know what I mean?
Does anyone have any thoughts as to another method of sorting?
What's the easiest way to force sorting in a particular order when you have odd entries like this?
111ss
112ss
113ss
11ss <- this should be above 111ss
121ss
122ss
123ss
12ss <- this should be above 121ss
I know the quick answer: put a "0" zero in front of all the smaller numbers to equalize it. Unfortunately, that's just not an option because it's "11ss", not "011ss".
My only idea is to create another field in the db for sorting, a numerical field like 1, 2, 3, 4, etc. so it'll be forced to sort in that order, but the tricky part is not having to rewrite the entire table everytime sorting is changed for all the entries under the changed number. Like, if there's 500 entries, and I change number 5, I don't want to have to rewrite all the fields for 6-500. Know what I mean?
Does anyone have any thoughts as to another method of sorting?