Do this:
<cfquery name="query" datasource="dsn">
Select * From Table
</cfquery>
<table width="100%" cellpadding="0" cellspacing="2" border="0"
align="center">
</tr>
<tr bgcolor="000080">
<cfset fieldcount = 0>
<cfloop list="#field#" index="curr_field">
<cfset fieldcount = fieldcount + 1>
<cfoutput>
<td><b><font face="arial" size="2"
color="FFFFFF">#curr_field#</font></b></td>
</cfoutput>
</cfloop>
<!--- <cfoutput>fieldcount: #fieldcount#</cfoutput> --->
</tr>
<cfset abc = 0>
<cfoutput query="selecttable" startrow="#start#"
maxrows="#max#">
<cfloop list="#field#" index="curr_col">
<cfif abc IS 0>
<tr bgcolor="#IIf(CurrentRow Mod 2, DE('ffffff'),
DE('dededf'))#" valign="top">
</cfif>
<cfset abc = abc + 1>
<td><font face="arial" size="2"
color="00008c"><b>#evaluate(curr_col)#</b></font></td>
<cfif abc IS fieldcount>
</tr>
<cfset abc = 0>
</cfif>
</cfloop>
</cfoutput>
-----Original Message-----
From: Jennifer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 16, 2001 11:04 AM
To: CF-Talk
Subject: Re: CFQUERY.COLUMNLIST
At 03:16 PM 1/16/01 +0000, you wrote:
>Hi all,
>
>I am try to get the recordset of a query from the cfquery.columnlist
>property.
>I am able to only display the recordset's value contents in one column of a
>table.
>Can tou help me to get them in tabular format.
I haven't used cfquery.columnlist but it seems that it is probably a comma
delimited list. If so, you can loop through the list similarly to the way
you'd loop through a query. Even if it isn't comma delimited, you can state
whatever delimiter is being used (even if it's simply a space).
<cfloop index="printmebaybee" list="cfquery.columnlist" delimiters=",">
<td>#printmebaybee#</td>
</cfloop>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists