Yes, I'm hoping Mike realized he could ignore my answer . . . instead of
thinking about how simple it was, I just modified my code that outputs a
query in vertical rows. Go with the simplest solution Mike!
<table>
<cfoutput query="myquery">
<cfif myquery.currentrow mod 3 eq 1>
<tr>
</cfif>
<td>#myquery.myfield#</td>
<cfif myquery.currentrow mod 3 eq 0>
</tr>
</cfif>
</cfoutput>
</table>
Dan
-----Original Message-----
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: 9/1/2000 10:29 AM
Subject: Re: [RE: How to display across a row instead of down?]
use MOD 3 in output
Dan Haley <[EMAIL PROTECTED]> wrote:
<cf_untested confidence_level="medium" but="you get the idea">
<cfset variables.num_cols = 3>
<cfset variables.col_len = int((query.recordcount - 1) /
variables.num_cols)
+ 1>
<cfloop from="1" to="#variables.col_len#" index="variables.i">
<cfloop from="1" to="#variables.num_cols#" index="variables.j">
<cfoutput>
#query.field[((variables.i - 1) * variables.num_cols) +
variables.j]#
</cfoutput>
</cfloop>
</cfloop>
</cf_untested>
Dan
-----Original Message-----
From: Michael Kear [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 31, 2000 11:12 PM
To: [EMAIL PROTECTED]
Subject: How to display across a row instead of down?
I want to display the results of my query in 3 columns instead of one.
I
know the method is something to do with mod3, but I'm dashed if i can
figure it out.
What I want to get is:
[record1] [record2] [record3]
[record4] [record5] [record6]
etc
Can anyone help me please with how to code it?
Cheers,
Mike Kear
AFP Web Development
Windsor, NSW, Australia
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.