Re: order/group query

2003-02-05 Thread Diana Soares
Yes, You can use the FIELD() function: SELECT * FROM table WHERE recordID IN ($string) ORDER BY FIELD(recordID,$string) On Tue, 2003-02-04 at 13:15, Wilbert Enserink wrote: > Hi All, > > I have a string containing recordID's in a specific order (e.g. > $string=17,2,33,5,99) > How can I select

Re: order/group query

2003-02-05 Thread Roger Baklund
* Wilbert Enserink > I have a string containing recordID's in a specific order (e.g. > $string=17,2,33,5,99) > How can I select those records from a table in the right order (as > determined in $string)? > > SELECT * FROM table WHERE recordID IN ($string) > > results in the right records but not

order/group query

2003-02-04 Thread Wilbert Enserink
Hi All, I have a string containing recordID's in a specific order (e.g. $string=17,2,33,5,99) How can I select those records from a table in the right order (as determined in $string)? SELECT * FROM table WHERE recordID IN ($string) results in the right records but not in the order I want, ins