Results 1 to 3 of 3
Jan 19, 2005, 11:11 #1
- Join Date
- Nov 2004
- Ithaca, NY
- 0 Post(s)
- 0 Thread(s)
Little puzzle with ENUM / ORDER BY
I'm not sure how to do this.
Basically, I'm looking for a way to specify the sort order of an enum column in my query, if possible.
Specifically, I want to order my results (data rows about a picture of an insect) by the value of an enum field (view angle: top, bottom, side, null). I have different categories of insects that I want to sort in different orders based on a kind of precedent in books on my subject. Larva tend to be shown from the top and adults from the side in most cases. So I want the top view to be the first on the page for larva, and the side view to be the first on the page for adults, and so on. There will be a few different cases like this.
Is there any way to do this with my MYSQL query, or am I going to have to hack out a solution with PHP?