Ordering an IN query

2009-06-05 Thread Aaron Fischer
I have a query that I build dynamically, here is an example: select from (table1 as t1 left join table2 as t2 on t1.id = t2.id) left join table3 as t3 on t1.id = t3.id where t1.id in ('221593', '221591', 'CC3762', 'CC0059') So I build the query in the order that I want it displayed. That

RE: Ordering an IN query

2009-06-05 Thread Martin Gainty
contenu fourni. From: afisc...@smith.edu To: mysql@lists.mysql.com Subject: Ordering an IN query Date: Fri, 5 Jun 2009 09:09:24 -0400 I have a query that I build dynamically, here is an example: select from (table1 as t1 left join table2 as t2 on t1.id = t2.id) left join table3

Re: Ordering an IN query

2009-06-05 Thread Perrin Harkins
On Fri, Jun 5, 2009 at 9:09 AM, Aaron Fischerafisc...@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