#List.env# will only return the first entry because it's not being looped over. It's like doing <cfoutput>#List.env#</cfoutput> without the query="List" attribute. You need to build the result into a list then put that into the cookie. There's various ways to build the result into a list try ListAppend, ListPrepend, ListInsertAt. Try one of those and see how you get on.
Ade -----Original Message----- From: FlashGuy [mailto:[EMAIL PROTECTED]] Sent: 08 October 2002 17:59 To: CF-Talk Subject: Reading in database and setting a cookie with the results Hi, I have a database with only two fields. I would like to read the database and shove the results of "env" into a cookie. I tried <cfloop but I only get the first occurence? The "env" field in my database contains 550 entries. I want the results into a cookie as a comma delimited string. Example: file1 file2 file3 file4 file5 Cookie contents: file1,file2,file3,file4,file5 <cfquery name="List" datasource="database" dbtype="ODBC"> SELECT env FROM prefs </cfquery> <cfcookie name="Display" value="#List.env#" expires="NEVER"> <cfoutput> #COOKIE.Display# </cfoutout> --------------------------------------------------- Colonel Nathan R. Jessop Commanding Officer Marine Ground Forces Guatanamo Bay, Cuba --------------------------------------------------- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

