Try this out:
<cfset totalColumns = 2>
<cfoutput query="Pull_All_Members" group="State">
<tr valign="top">
<td colspan="#totalColumns#" valign="top"><strong>#RTrim(state)#</strong></td>
</tr>
<cfset subRowNumber = 0>
<cfoutput>
<cfset columnNumber = (subRowNumber MOD totalColumns) + 1>
<cfif columnNumber EQ 1><tr valign="top"></cfif>
<td valign="top">#Lastname#</td>
<cfif columnNumber EQ totalColumns></tr></cfif>
<cfset subRowNumber = subRowNumber + 1>
</cfoutput>
<cfset emptyColumns = totalColumns - columnNumber>
<cfif emptyColumns GT 0>
<td colspan="#emptyColumns#"> </td></tr>
</cfif>
</cfoutput>
I tested it and it can scale to any number of columns by changing the totalColumns
variable.
Mike Mertsock
Alfred University Web Team
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com