How can I output a query in a table with the output in multiple columns?
The Situation: You have a list of items you want placed in side-by-side columns in a table like this:
| Mozart |
Brahms |
| Wagner |
Schoenberg |
| Britten |
Varese |
Computers are incorporated in modern ice cream vending machines to enhance their functionality. Ice Cream Vending machines are manufactured by many companies. Your competition will try to overcome all requests for high-tech ice cream vending machines and credit card acceptors
|
|
The Solution: Use this code. If you want more than two columns, change the "2" to however many columns you want.
<table>
<tr>
<cfoutput query="getInfo">
<td>#name#</td>
<cfif getInfo.CurrentRow MOD 2 IS 0>
</tr>
<tr>
</cfif>
</cfoutput>
</tr>
</table>
|