RE: Sorting by a comma list

2004-09-23 Thread Andrew Dixon - MSO.net
Excellent. Worked like a dream. Thanks. Andrew -Original Message- From: news [mailto:[EMAIL PROTECTED] On Behalf Of Harald Fuchs Sent: 23 September 2004 15:14 To: [EMAIL PROTECTED] Subject: Re: Sorting by a comma list I think SELECT id, title, description FROM table1 WHERE id

Re: Sorting by a comma list

2004-09-23 Thread Michael Stassen
It won't be fast, but SELECT id, title, description FROM table1 WHERE id IN (4,1,3,6,8,2) ORDER BY FIND_IN_SET(id, '4,1,3,6,8,2'); See the manual for more . Michael Andrew Dixon - MSO.net wrote: Hi Everyone. I'm not sure if this is

Re: Sorting by a comma list

2004-09-23 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, "Andrew Dixon - MSO.net" <[EMAIL PROTECTED]> writes: > Hi Everyone. > I'm not sure if this is possible of not, but I want to sort a query by a > comma list. Here is what I'm doing: > SELECT id, title, description > FROM table1 > WHERE id IN (4,1,3,6,8,2) > This re