Richard use: valueList(query.column,  delimiter)

this will create the list you want.  set query.colum, to
yourQueryName.yourEmailColumn, and the delimited to ";"

hth
----- Original Message ----- 
From: "Lovelock, Richard J" <[EMAIL PROTECTED]>
To: "'cflist'" <[EMAIL PROTECTED]>
Sent: Monday, March 15, 2004 3:48 PM
Subject: [ cf-dev ] Best way to create semi-colon email list


> guys
>
> what is the most efficient way to retrieve a list of emails from DB and
> create a semi-colon separated list:
>
> at the moment, I have:
>
> <!--- Get EMails --->
> <cfquery datasource="fclounge" name="getemails">
> SELECT email
> FROM contacts
> where email <> '-'
> </cfquery>
>
> <!--- Output results --->
> <cfoutput>
> <cfdump var="#getemails#">
> </cfoutput>
>
> <!-- Create new blank list --->
> <cfset emails = ''>
>
> <!--- loop through query and append to list --->
> <cfloop query="getemails">
> <cfset emails = ListAppend("#emails#", "#email#", ";")>
> </cfloop>
>
> <!--- Output final list --->
> <cfoutput><br> List is #emails#</cfoutput>
>
> - Is this the way to go? This is kinda working. How do I add a space in
> after the ";" - i tried <cfset emails = ListAppend("#emails#", "#email#",
> ";" & chr(32))> but that didn't work?
> - Also, any email addresses with a hyphen in are being split over two
lines
> when I output the variable?
>
>
>
> _______________________________________________________<?xml:namespace
> prefix = o ns = "urn:schemas-microsoft-com:office:office" />
>
> *  Regards,
>                 Richard Lovelock,
>                 Senior Application Analyst.
>
> Westminster City Council - Web Support
> Cap Gemini Ernst & Young
> Southbank
> 95 Wandsworth Road
> London
> SW8 2HG
>
> (     0870 906 7482
>
> _______________________________________________________
>
>
>
>
> =======================================================
> This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group. It is intended
only for the person to whom it is addressed. If you are not the intended
recipient, you are not authorised to read, print, retain, copy, disseminate,
distribute, or use this message or any part thereof. If you receive this
message in error, please notify the sender immediately and delete all copies
of this message.
> =======================================================
>
>


-- 
These lists are syncronised with the CFDeveloper forum at 
http://forum.cfdeveloper.co.uk/
Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
 
CFDeveloper Sponsors and contributors:-
*Hosting and support provided by CFMXhosting.co.uk* :: *ActivePDF provided by 
activepdf.com*
      *Forums provided by fusetalk.com* :: *ProWorkFlow provided by proworkflow.com*
           *Tutorials provided by helmguru.com* :: *Lists hosted by gradwell.com*

To unsubscribe, e-mail: [EMAIL PROTECTED]

Reply via email to