This is good, but does anyone have an idea for filling one column, then a
second with both columns being close to equal, but keeping grouping in the
same column???
Alabama Texas
Company 1 Company 4
John Jack
Bill Tyson
Company 2 Eric
Ryan Company 5
Joe Shane
Kansas Tony
Company 3 Chad
Jimmy John
Jason
And the fun part is not getting the data to format like this once, but when
a new state, or company, or Person is added, then I have to change code on
the page...not real dynamic that way. For better referance look at
http://www.inmarcollc.com/pva/reps.cfm
I don't care if the State wraps columns, but I want the cities to stay
together. Any Help would be great.
Christian
-----Original Message-----
From: Ryan Emerle [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 30, 2001 11:19 AM
To: CF-Talk
Subject: RE: Outputing a Query In a different format Question...
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