John,
I went though this some time ago myself. I did not debug your attempt -
rather I have sent my solution for you to review/use. I was fortunate enough
to get help from another list when I needed it also :-)
Tony Gruen
<!--- run your query - in this example my query is named 'GetFeatured' --->
<!--- set the variable of how many columns you want --->
<cfset ColumnCount=3>
<!--- this table creates the out put - nutscrape 4.x friendly --->
<table bgcolor="FFFFFF" cellspacing="0" cellpadding="1" border="0"
align="center" width="100%">
<tr>
<cfoutput query="qGetFeatured">
<cfif (qGetFeatured.CurrentRow GT ColumnCount) AND (qGetFeatured.CurrentRow
mod ColumnCount is 1)>
</tr><tr>
</cfif>
<td align="center" valign="top">
<img src="images/brand_images/#featured_image#" alt="#brand_name#"
border="0"><br>
#brand_name#
</td>
</cfoutput>
<!---For Netscape, fill any remaining cells with a "hard space"--->
<cfif qGetFeatured.RecordCount mod ColumnCount GT 0>
<cfloop from=1 to=#Evaluate(ColumnCount-(qGetFeatured.RecordCount mod
ColumnCount))# index=index>
<td> </td>
</cfloop>
</cfif>
</tr>
</table>
-----Original Message-----
From: John Munyan [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 02, 2002 11:58 AM
To: CF-Talk
Subject: Advice?
Hi, I am new to using coldfusion and programming in general. I have spent
the last two days (no joke) trying to figure out how to take the output of a
cfquery and split it up into multiple columns. I have found a couple
examples on the web for doing this and have tried diligently to adapt them
to my situation. I would appreciate it if someone could give me a pointer
about where I am going wrong with what I am doing if you would be so kind.
I really seem to be at my wits end and feel I am missing something
fundamental.
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
______________________________________________________________________
Signup for the Fusion Authority news alert and keep up with the latest news in
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists