Prob post-process the query data... And store in an array/query!

Ie... You put the list into an array, then loop over the query, find the
position in the array, and then add it to a new array/query or whatever
format you want!

Can't guarantee the order things are going to come out in using that syntax!


Paul

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] 
> Sent: 29 September 2003 11:21
> To: [EMAIL PROTECTED]
> Subject: [ cf-dev ] order by
> 
> 
> say you've got a query like:
> 
> <cfquery>
>      SELECT ID, Name
>      FROM Table
>      WHERE ID IN (#IDList#)
> </cfquery>
> 
> where IDList maybe looks like 1,7,2,8,3,6,55,4, etc.  How do 
> you get the query to order by the order specified in your 
> list?  Using an access database, I've got a query like this, 
> but it seems to be ordering by ID by default, i.e. the order 
> the records are stored in the table.  Any simple ways to not 
> make this happen, like ORDER BY #IDList# ?
> 
> 
> Duncan Cumming
> IT Manager
> 
http://www.alienationdesign.co.uk
mailto:[EMAIL PROTECTED]
Tel: 0141 575 9700
Fax: 0141 575 9600

Creative solutions in a technical world

----------------------------------------------------------------------
Get your domain names online from: http://www.alienationdomains.co.uk
Reseller options available!
----------------------------------------------------------------------
----------------------------------------------------------------------


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] For human
help, e-mail: [EMAIL PROTECTED]



--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to