Eli, sssuming, the email body is in the field "me", you can do
the following:
<!--- set the variable for emty file content --->
<cfset tmpVar = "">
<!--- set the line break (cariage return) variable --->
<cfset myCR = chr(13) & chr(10) >
<!--- build the whole file content --->
<cfloop query="myQuery">
<cfset tmpVar = tmpVar & me & mrCR>
</cfloop>
<!--- now, the content of your file is prepared and you
can do two things: --->
<!--- 1. to append to the existing file --->
<cffile action="APPEND" file="#Application.LocalServer#emails.txt"
OUTPUT="#tmpVar#">
<!--- 2. to write a new file --->
<cffile action="WRITE" file="#Application.LocalServer#emails.txt"
output="#tmpVar#">
Hope, this will resolve your problem ;-)
Best,
Miro.
-------------------------------------------------------------------
Mirek Hryckowiak
[EMAIL PROTECTED]
[EMAIL PROTECTED]
----- Original Message -----
From: "OleBlighty" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 14, 2000 5:21 AM
Subject: Re: cffile from query
> ----- Original Message -----
> From: Eli Shechter <[EMAIL PROTECTED]>
> Subject: cffile from query
>
>
> Hi
>
> i am trying to get info from a database and put it into a text file.
> i was trying to use cffile but i dont want to run cffile for every
record
> example:
> <cfoutput query="myQuery">
> <cffile action="WRITE"
> file="#Application.LocalServer#emails.txt"
> output="#me#">
> </cfoutput>
>
> i figure there has got to be a way to make a text file with a lot of
> records, without appending everyone individually to a text file
>
> Thanx
>
> -Eli-
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.