MYSQL Sorting IN by orignal order?
I have the following query, which the data within IN is built from PHP. The order is important cause it references miles from and to in order of distance. The problem is I need to get this all into one query. My query works, but it grabs records all over hte place. I would like it to get the data by each zipcode.
SELECT * FROM `autos` WHERE `zip` IN ( 80033, 80034, 80002, 80215, 80001, 80212, 80214, 80225, 80004, 80003, 80226, 80211, 80005, 80204 )
so 80003 vehicle data would come first, then 80034 would be next and so on. Instead of 80226,80005,80003,80005,80005 which is the behavior I get from the query now.
Any ideas? I have tried everything I know, which is not a ton.