<cfloop query="List"> should loop through all the records returned by the List query... does that help? John
At 09:59 AM 10/8/2002, you wrote: >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 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

