Let's say I have a table with the following column:
type varchar(20) not null default ''
I'll put 3 rows in with values:
"88x31"
"120x150"
"468x60"
How can I order them so they will come out ordered smallest to greatest (ie. they should come out in the order above)
If I ORDER BY type, the 88x31 will be last since it has one less number....ordering by length() won't work.....
I know I can insert them in the right order and use their ID (i do have other fields in the real table). However this isn't an optimal way if I add new rows later on.
I know I can also split it into two integer fields, one for the num before the x, the other for the part after the x (width and height)...this will be my solution should no one have any other ...
Any ideas??