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.
------------------------------------------------------------------------------
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.
____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message
to [EMAIL PROTECTED] with 'unsubscribe' in the body.