We have product codes that go as follows:
- AGE100 (stands for AGE 1.00 ounce)
- AGE050 (stands for AGE 0.50 ounce)
- AGE025 (stands for AGE 0.25 ounce)
- AGE010 (stands for AGE 0.10 ounce)
So on and so forth. I would like the database to return them alphabet first, then by the number code at the end, so KR100 would be lower than AGE050.
My current query,
SELECT * FROM 'prices' ORDER BY 'code' ASC LIMIT 0 , 30
Returns:
- AGE010
- AGE025
- AGE050
- AGE100
- KR100
How would I make it sort the numbers in the code properly?