On Fri, Jun 5, 2009 at 9:09 AM, Aaron Fischer<afisc...@smith.edu> wrote: > So I build the query in the order that I want it displayed. That is display > 221593, then 221591, then CC3762, etc. However, when the query is executed > it looks like it automatically sorts the codes in ascending order, so I get > 221591, then 221593, the CC0059, etc. > > I want the results displayed in the order that I build the query. Is there > some way of doing that?
You'll have to use a function like CASE() or FIND_IN_SET() to map the IDs to values in an ORDER BY clause. - Perrin -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org