I’m doing an e-commerce website for a client who sells lingerie, I’ve written up a bra size picker for them but they’ve come back to me today with a slight issue.
With bra sizes, AA is smaller than A, so it should appear before that in the chart, but when I use MySQL order by on the size, obviously it puts A first, then AA, then B etc.
Is there a simple way I can get MySQL to order AA first, then A, B etc.?
Assuming
Ais the only possible repeating letter, you can do this:But a better solution would be to create a conversion table which would store all possible sizes (European, Japanese etc) including metrical on which yoг can order.
You may use it to build conversion charts and show the sizes in person’s preferred system as well.