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>&nbsp;</td>
                        <td>&nbsp;</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]
 

Reply via email to