Show Query Results in a 4-across table

dazzlindonna 0 Tallied Votes 111 Views Share

If query is called getResults and your field name is called myField

To change to 2-across or 3-across, or whatever, just change the MOD 4 to 2 or 3 or whatever number you wish.

<table>
<tr>
<cfoutput query="getResults">
<td>#myField#</td>
<cfif getResults.CurrentRow MOD 4 IS 0>
</tr>
<tr>
</cfif>
</cfoutput>
</table>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.