RE: keeping given order in resulset

2002-03-22 Thread Roger Baklund
* Mickael Bailly > I got a table having an auto_increment field, let's say 'id'. > tis table has a varchar field too, let's say 'name'. > > Is there a way to do something like: > > select id, name from table where id in (5,3,7) > > AND that mysql orders the results the way I gave into the >

Re: keeping given order in resulset

2002-03-22 Thread Mickael Bailly
All the best, > Jayasimhan A > - Original Message - > From: Mickael Bailly <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Friday, March 22, 2002 3:13 PM > Subject: keeping given order in resulset > > > Hello ! > > > > I got a table h

Re: keeping given order in resulset

2002-03-22 Thread Mickael Bailly
Hello, there is no difference between select id, name from table where id in (5,3,7) and select id,name from table where find_in_set (id, "5,3,7"); Or I didn't see it... anyway this doesn't solve my problem. Mickael On Friday 22 March 2002 11:32, Georg Richter wrote: > On Friday, 22. March 2

Re: keeping given order in resulset

2002-03-22 Thread Jayasimhan A
Try "order by id". All the best, Jayasimhan A - Original Message - From: Mickael Bailly <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 22, 2002 3:13 PM Subject: keeping given order in resulset > > Hello ! > > I got a table having an a

Re: keeping given order in resulset

2002-03-22 Thread Georg Richter
On Friday, 22. March 2002 10:43, Mickael Bailly wrote: > Hello ! > > I got a table having an auto_increment field, let's say 'id'. tis table > has a varchar field too, let's say 'name'. > > Is there a way to do something like: > > select id, name from table where id in (5,3,7) > > AND that mysql

keeping given order in resulset

2002-03-22 Thread Mickael Bailly
Hello ! I got a table having an auto_increment field, let's say 'id'. tis table has a varchar field too, let's say 'name'. Is there a way to do something like: select id, name from table where id in (5,3,7) AND that mysql orders the results the way I gave into the 'IN(...)' clause ?