Hi Richard, This should help:
http://dev.mysql.com/doc/refman/5.0/en/any-in-some-subqueries.html Basically, you can do like: SELECT * FROM tableX WHERE tableXId IN (#listOfIds#) With cfqueryparam that looks like <cfqueryparam cfsqltype="cf_sql_integer" value="#listOfIds#" list="true"> You'll also need ArrayToList(). HTH Dominic On 22/04/2008, Richard White <[EMAIL PROTECTED]> wrote: > > hi > > i have an array of subjectId's. i have a table in my database called > subjects with the primary key set as subjectID > > i have 2 other columns called first name and last name. > > i want to be able to get the first names and last names only for the > subjects ids stored in my array > > is there a way in mysql or coldfusion to do this without the need of a > loop > > or is the only way to loop through the array of subject ids getting each > first name and last name one at a time > > thanks > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:303970 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

