Copy link to clipboard
Copied
I have a query which output 100 records instead of display 100 in one row I am trying to display in matrix form like 20X5 but I am unable to do
any suggestion ?
The usual method for this type of problem is to use the mod operator.
<table>
<tr>
<cfoutput query='my100records'>
<td>#aValue#</td>
<cfif my100Records.currentRow mod 20 eq 0>
<!--- the current row is evenly divisable by 20, start a new row --->
</tr>
<tr>
</cfif>
</cfoutput>
</tr>
</table>
Copy link to clipboard
Copied
The usual method for this type of problem is to use the mod operator.
<table>
<tr>
<cfoutput query='my100records'>
<td>#aValue#</td>
<cfif my100Records.currentRow mod 20 eq 0>
<!--- the current row is evenly divisable by 20, start a new row --->
</tr>
<tr>
</cfif>
</cfoutput>
</tr>
</table>