Do you find you're only getting one value and a comma in
session.EmailIDList? Use ListAppend() to add the values to a list in the
loop.
<cfparam name="EmailIDList" default="">
<cflock timeout="30" throwontimeout="No" type="EXCLUSIVE" scope="SESSION">
<cfloop query="getEmails">
<cfset SESSION.EmailIDList = ListAppend()> <<< can't remember the syntax
</cfloop>
</cflock>
The list separator will default to a comma, but you could change it if ytou
like
Ade
-----Original Message-----
From: Adams, Stephen [mailto:[EMAIL PROTECTED]]
Sent: 14 August 2002 10:31
To: CF-Talk
Subject: Problem building a comma separated list.
**********************************************************************
WESTMINSTER CITY COUNCIL
Please refer to the disclaimer beneath this message
**********************************************************************
Hi,
I am trying to build a comma separated list of ID number, something I have
done many times before, but for some reason this code does not seem to be
working. Here is my code:
<cfparam name="EmailIDList" default="">
<cflock timeout="30" throwontimeout="No" type="EXCLUSIVE" scope="SESSION">
<cfloop query="getEmails">
<cfset EmailIDList = EmailIDList & #ID# & ",">
</cfloop>
<cfset session.EmailIDList = #EmailIDList#>
</cflock>
I know it is a bit of a no-brainer, but can anyone tell me where I am going
wrong?
Stephen
**********************************************************************
Westminster City Council switchboard:
+44 20 7641 6000
**********************************************************************
This E-Mail may contain information which is
privileged, confidential and protected from
disclosure. If you are not the intended recipient
of this E-mail or any part of it, please telephone
Westminster City Council immediately on receipt.
You should not disclose the contents to any other
person or take copies.
**********************************************************************
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists