I'm working with a database where end users can upload photos of their collectibles and other effects, and under one of the criteria they can add entries is the condition of the product (near mint, mint, excellent, etc). If I want to sort these entries by condition, it will sort it alphabetically, but this doesn't correspond to the actual sorted-by-condition. For example, E (excellent) will appear before M (mint), when excellent is worse than mint.
How can I assign values to these letters in my database so when sorted they will appear in an order that is not alphabetic, but by actual grade (M > NM > E > G > P).