Here is something i threw together _real_ quick, it uses MOD to generate
'number_of_sections' divisions of the data in a table. And,
number_of_sections is dynamic based on the recordcount of the query. (the
query is named "contacts")
---- Snip ---
<cfquery name="contacts" [...]>
[...]
<cfset count=1>
<cfset number_of_sections=4>
<cfset sections=contacts.recordcount/number_of_sections>
<table >
<tr>
<td>
<cfloop query="contacts">
<Cfif not count mod sections>
</td><td>
</cfif>
<!--- Output query data --->
<li>#contacts.lastName#, #contacts.firstName#<Br>
<cfset count=count+1>
</cfloop>
</td>
</tr>
</table>
---- End Snip ---
-Ryan
-----Original Message-----
From: David Burt [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 12:22 PM
To: CF-Talk
Subject: Outputing a Query In a different format Question...
My problem is that I would like to change the way a query is outputed on the
page in a table. A picture is worth a thousand words. see below:
regular CFOUTPUT
user1 user1phoneNumber
user2 user2phoneNumber
user3 user3phoneNumber
user4 user4phoneNumber
Instead of outputting it like this, I would like for it to look like this:
user1 user1phoneNumber user2 user2phoneNumber
user3 user3phoneNumber user4 user4phoneNumber
Comming from ASP, this is pretty easy because of the ADO MoveNext command.
basically you put it in between the columns for the first user and the
second user. then one after the <TR>.
If I have confused anyone, let me know.
Thanks in Advance....
David
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists