By: Rhino
<cfquery name="listall"
             datasource="[yourDSN]">

         select * from [yourdatabase]

</cfquery>

<html>
<head>
<title>List All</title>
</head>

<body>

<center>
<Table border="1" width="100%">

 

<CFLOOP INDEX="current_row"
              FROM=
"1"
              TO=
"#ceiling(listall.recordcount/3)#"
              STEP=
"1">
<tr>
<cfparam name="startrow" default="1">
<CFOUTPUT
             QUERY=
"listall"
             STARTROW=
"#startrow#"
             MAXROWS=
"3">

<td width ="33%">#Firstname# #lastname#<br>#address1#<br>#address2#<br>#state# #zip#<P></td>
</CFOUTPUT>

<cfset startrow = #startrow# + 3>
</tr>

</center>
</cfloop>
</table>

</body>
</html>

About This Tutorial
Author: Rhino
Skill Level: Intermediate 
 
 
 
Platforms Tested: CFMX
Total Views: 69,856
Submission Date: February 25, 2004
Last Update Date: June 05, 2009
All Tutorials By This Autor: 10
Discuss This Tutorial
  • Here's where I used one extra line with the cfoutput query type:

    #Firstname# #lastname#
    #address1#
    #address2#
    #state# #zip#

Advertisement

Sponsored By...
Mobile App Development (IOS, Android, Cordova, Phonegap, Objective-C, Java) - Austin, Texas Mobile Apps - Touch512, LLC.