Re: Sort results by order in list

2007-10-30 Thread Papalagi Pakeha
On 10/30/07, Johan Höök <[EMAIL PROTECTED]> wrote: > Hi, > what you probably want is > SELECT id, start_date FROM iddt WHERE id IN > ('109k7','s3x6','sxmns','wt57') > ORDER BY FIELD(id,'109k7','s3x6','sxmns','wt57') That's exactly it! Thanks a lot :-) Just for the record, here's the FIELD() funct

Re: Sort results by order in list

2007-10-30 Thread Papalagi Pakeha
On 10/30/07, Sebastian Mendel <[EMAIL PROTECTED]> wrote: > Papalagi Pakeha schrieb: > > Hello, > > > > I have a query like: > > SELECT id, start_date FROM iddt WHERE id IN ('109k7','s3x6','sxmns','wt57'); > &g

Re: Sort results by order in list

2007-10-30 Thread Papalagi Pakeha
8:58:20 | > >| wt57 | 2007-10-07 15:57:37 | > >| sxmns | 2007-10-06 02:17:30 | > >+---+-+ > > What rule generates the order 109k7, s3x6, wt57, sxmns? > > PB > > Papalagi Pakeha wrote: > > Hello, > > > > I have a query like: >

Sort results by order in list

2007-10-29 Thread Papalagi Pakeha
Hello, I have a query like: SELECT id, start_date FROM iddt WHERE id IN ('109k7','s3x6','sxmns','wt57'); which gives me: +---+-+ | id| start_date | +---+-+ | 109k7 | 2007-10-07 12:06:58 | | sxmns | 2007-10-06 02:17:30 | | wt57 | 2007-10