Damn, missed a closing bracket: ListAppend(myOutput,pull_data[currentColumn][pull_data.currentRow])>
On Tue, May 6, 2008 at 11:43 AM, James Holmes <[EMAIL PROTECTED]> wrote: > If you genuinely don't know the column names to start with, you may as > well just SELECT * from the table and use thequery.columnlist as the > list of column names. It will at least speed things up my eliminating > one query from the code. > > As for using the column names in the CSV, use the full query syntax: > > <cfloop query="pull_data"> > > <cfset myOutput = ""> > <cfloop list="#columns#" index="currentColumn"> > <cfset myOutput = > ListAppend(myOutput,pull_data[currentColumn][pull_data.currentRow]> > </cfloop> > > > <cffile action="APPEND" > file="#yopath#" > output="#myOutput#" > addnewline="yes"> > </cfloop> > > > > On Tue, May 6, 2008 at 11:23 AM, Steve Good <[EMAIL PROTECTED]> wrote: > > I'm not sure that would do what I need, or I'm not understanding. > > > > Here's a snippet of the code I'm using. I'm pulling the column names > from a > > table and passing the list to my query and then using the list as the > first > > row in a csv file. > > > -- > mxAjax / CFAjax docs and other useful articles: > http://www.bifrost.com.au/blog/ > -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:304776 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4