Che meant arraytolist() of course Assuming that subjected is an integer:
Select firstName, lastName from table where subjected in <cfqueryparam cfsqltype="cf_sql_integer" list="true" value="#arraytolist(myArray)#" /> This would throw an error on an empty list so be sure to check the arrayLen(myArray) beforehand ..:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -----Original Message----- From: Che Vilnonis [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 22, 2008 9:27 AM To: CF-Talk Subject: RE: cfquery with array Richard, try using listtoarray to create a new variable and then a SQL "IN" statement on the newly created list. ~Che -----Original Message----- From: Richard White [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 22, 2008 9:24 AM To: CF-Talk Subject: cfquery with array 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:303971 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

