The code below will create colums of your output data. All you need to do
is change the number after the "MOD" to equal the number of colums you want
(example: MOD 2 IS 0 will give you two colums...).
Hope this helps.
<tr>
<cfoutput query="qryProjects">
<td>#ProjTitle#</td>
<cfif qryProjects.CurrentRow MOD 4 is 0>
</tr>
<tr>
</cfif>
</cfoutput>
</tr>
Dave Liles
HNTB New Media
http://www.hntb.com
[EMAIL PROTECTED]
816-527-2635
-----Original Message-----
From: Hansen, Justin [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 1:18 PM
To: [EMAIL PROTECTED]
Subject: RE: [KCFusion] Output in Newspaper style format
I have had to do that before. This output/table code will do the trick.
<table>
<tr>
<td>Customer</td>
<td>Phone</td>
<td>Customer</td>
<td>Phone</td>
</tr>
<cfset tdCount=0>
<cfouput query="yourquery">
<cfif tdCount is 0>
<!--- cols 1,2 --->
<cfset tdCount=1>
<tr>
<td>#cust_name#</td>
<td>#cust_phone#</td>
<cfelse>
<!--- cols 3,4 --->
<cfset tdCount=0>
<td>#cust_name#</td>
<td>#cust_phone#</td>
</tr>
</cfif>
</cfoutput>
<!--- cols 3,4 if count is 1 --->
<cfif tdCount is 1>
<td> </td>
<td> </td>
</tr>
</cfif>
</table>
Enjoy!
Justin Hansen
Web Application Developer
GreenSoft Solutions, Inc.
----------------------------
[EMAIL PROTECTED]
http://www.greensoft.com/
----------------------------
-----Original Message-----
From: Chris [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 12:47 PM
To: Hansen, Justin
Subject: [KCFusion] Output in Newspaper style format
Is there an easy way to do the following?
My select statement is SELECT cust_name, cust_phone
FROM customer ORDER BY cust_name.
I want my output to be like this.
Customer Phone Customer Phone
John Doe 111.111.1111 Joe Smith
222.222.2222
Alice Wilson 333.333.3333 Paul Wilson
444.444.4444
What I've got now is the customer/phone list coming
out in 1 column in a table. Is it possible to do it
in two in ColdFusion? I think I can do this in SQL,
but I'd rather have CF handle it if I can.
Thanks,
Chris
__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]
______________________________________________________________________
The KCFusion.org list and website is hosted by Humankind Systems, Inc.
List Archives........ http://www.mail-archive.com/cf-list@kcfusion.org
Questions, Comments or Glowing Praise.. mailto:[EMAIL PROTECTED]
To Subscribe.................... mailto:[EMAIL PROTECTED]
To Unsubscribe................ mailto:[EMAIL PROTECTED]