Order by in clause

2010-11-09 Thread Mark Goodge
Hi, I have a query like this: select id, title from product where id in (1,3,5,8,10) What I want it to do is return the rows in the order specified in the in clause, so that this: select * from product where id in (10,3,8,5,1) will give me results in this order: +--+-+ | id

Re: Order by in clause

2010-11-09 Thread Joeri De Backer
On Tue, Nov 9, 2010 at 10:09 AM, Mark Goodge m...@good-stuff.co.uk wrote: Hi, I have a query like this: select id, title from product where id in (1,3,5,8,10) What I want it to do is return the rows in the order specified in the in clause, so that this: select * from product where id in

RE: Order by in clause

2010-11-09 Thread Daevid Vincent
-Original Message- From: Joeri De Backer [mailto:fons...@gmail.com] Sent: Tuesday, November 09, 2010 1:16 AM To: mysql Subject: Re: Order by in clause On Tue, Nov 9, 2010 at 10:09 AM, Mark Goodge m...@good-stuff.co.uk wrote: Hi, I have a query like this: select id