I have a categories table with 4 fields: id, category, condition, description.
Each category has a corresponding condition and only one condition so they are in the same table.
I need to create two lists from this table each to be used in a different place. In one place I need a list of categories ordered alphabetically by category. In another place I need a list of conditions ordered alphabetically by condition.
Getting the array of data by one or the other field is simple:
Select from cats order by category or
Select from cats order by condition
I'd like to create both lists without doing two queries. How can I make that happen?