DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ColdFusion (http://www.daniweb.com/forums/forum19.html)
-   -   Code Snippet: Show Query Results in a 4-across table (http://www.daniweb.com/forums/thread216313.html)

dazzlindonna Sep 20th, 2004 9:07 am
Show Query Results in a 4-across table
 
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.

  1. <table>
  2. <tr>
  3. <cfoutput query="getResults">
  4. <td>#myField#</td>
  5. <cfif getResults.CurrentRow MOD 4 IS 0>
  6. </tr>
  7. <tr>
  8. </cfif>
  9. </cfoutput>
  10. </table>

All times are GMT -4. The time now is 1:10 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC