I realize this probably isn’t the place I will ever get the answer I am looking for, but just in case…

I have a MySQL table with a primary key index on id. I would like to, for example, retrieve items with IDs 1, 7, and 4 in that order. I have tried

SELECT * FROM my_table WHERE id IN (1, 7, 4)

and

SELECT * FROM my_table WHERE id = 1 OR id = 7 OR id = 4

without success. Both queries return my results in numerical order. Does anyone know how to set the order from the query. I know how to put the items in order using this query and then some Ruby or PHP, but I want to get them in the order straight from the database and I don’t want to add a sort_order column or anything. Thanks.