mysql
Arbitrary ordering in MySQL
Suppose you want to order some sql results in an arbitrary order. How would you do that?
Use ORDER BY FIELD:
SELECT * from test WHERE OrderID IN (10,5,9)
order by field(OrderID,10,5,9)
Thanks to Rudy for this one.