You want to split 30 records into 15 in each column?
If that is what you are saying then, this might help.
Let's say your query is named 'q' and it has columns 'title' and 'body' with
30 records total.

<cfset cols=round(q.recordcount/2)>

<table>
<tr>
<td valign="top">
<cfloop from=1 to="#cols#" index="i">
<cfoutput>
#q.title[i]#<br>
#q.body[i]#<br>
</cfoutput>
<br>
</cfloop>
</td>
<td valign="top">
<cfset fromcol=cols+1>
<cfloop from="#fromcol#" to="#q.recordcount#" index="i">
<cfoutput>
#q.title[i]#<br>
#q.body[i]#<br>
</cfoutput>
<br>
</cfloop>
</td>
</tr>
</table>


Joseph DeVore
VeloxWeb Technologies



-----Original Message-----
From: Tangorre, Michael T. [mailto:[EMAIL PROTECTED]]
Sent: Sunday, November 18, 2001 10:34 PM
To: CF-Talk
Subject: cfquery and two column output


Hello Everyone.

I have a query that returns say 30 records.  What I am attempting to do is
output the records in two columns but I am not having much luck.
Can someone point me in the right direction?

TIA,
Mike


Michael T. Tangorre

============================
Resident Assistant - Brick
Web Applications Developer
A.U. Webteam Slave  :-)
AIM: CrazyFlash4

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to