Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output in Multiple Columns

General

Output in Multiple Columns

by  DeZiner  Posted    (Edited  )
General <CFOUTPUT> usage will output your data in rows and rows. Sometimes layout calls for split columns of the rows.

Typical output
text
text
text
text
text
text

To split the rows into columns

<!--- Specify the number of columns to return --->
<CFSET NumCols = 2>

<!--- Use a table--->
<table>
<tr>

<CFOUTPUT query="qResults">

<CFIF (CurrentRow MOD NumCols) IS 1>
</tr><tr>
</CFIF>

<td>#Field#</td>
</CFOUTPUT>

</tr>
</table>


New Output
text text
text text
text text
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top