macromedia.coldfusion.advanced_techniques
[Top] [All Lists]

Re: How to create a text file from a query

Subject: Re: How to create a text file from a query
From: Ian Skinner <iskinner@xxxxxxxxxxx>
Date: Thu, 31 Jul 2008 12:42:06 -0700
Newsgroups: macromedia.coldfusion.advanced_techniques


A couple of ways.

1) You loop over the query and output it into a text variable then write the text variable to the file. You can use string concatenation to build the variable OR the <cfsavecontent...> tag on the more recent flavors of CF.

2) You loop over the query and append the output to the file.

The choice between one and two is largely how is the file created|updated? If it is done all at once then option one is a bit more performerent. If the file grows over time then option two is the way to go.

<Prev in Thread] Current Thread [Next in Thread>