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?
 
 

_______________________________________________________

 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.
=======================================================

Reply via email to