You can do a list loop over recordset.columnList with CF.
<cfloop query="getRows">
<cfset v = "" />
<cfloop list="#columnList#" index="i">
<cfset v = listAppend(v, getRows[i][currentRow], " ") />
</cfloop>
</cfloop>
cheers,
barneyb
On Sun, May 4, 2008 at 10:35 AM, Richard White <[EMAIL PROTECTED]> wrote:
> hi
>
> i have a query that returns x amount of columns (i wont always know how
> many) such as follows:
>
> col1 | col2 | col3
> ------------------
> 1 | 2 | 3
>
> i need to run some code that combines the columns into one string, and each
> value seperated by a space.
>
> so that a string would then equal "1 2 3"
>
> is there an easy way to do this or would i have to do it the complicated way
> by finding how many columns there are and then looping through the columns
> adding all the values to a string
>
> thanks
>
> richard
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:304721
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4