Adobe COLDFUSION 9 Manual page 438

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Accessing and Using Data
<td bgcolor = f0f0f0>
<b><i>Salary</i></b>
</td>
</tr>
<!--- Output the query and define the startrow and maxrows
parameters. Use the query variable currentRow to
keep track of the row you are displaying. --->
<cfoutput query = "GetSals2" startrow = "#StartRow#" maxrows = "#MaxRows#">
<tr>
<td valign = top bgcolor = ffffed>
<b>#GetSals2.currentRow#</b>
</td>
<td valign = top>
<font size = "-1">#FirstName#</font>
</td>
<td valign = top>
<font size = "-1">#LastName#</font>
</td>
<td valign = top>
<font size = "-1">#LSCurrencyFormat(Salary)#</font>
</td>
</tr>
</cfoutput>
<!--- If the total number of records is less than or equal to
the total number of rows, provide a link to the same page, with the
StartRow value incremented by MaxRows (5, in this example) --->
<tr>
<td colspan = 4>
<cfif (startrow + maxrows) lte getsals2.recordcount>
<a href="qoq_next_row.cfm?startrow=<cfoutput>#Evaluate(StartRow +
MaxRows)#</cfoutput>">See next <cfoutput>#MaxRows#</cfoutput>
rows</a>
</cfif>
</td>
</tr>
</table>
</body>
</html>
2
Save the page as qoq_next_row.cfm in the myapps directory under the web_root.
3
Display qoq_next_row.cfm in your browser.
Using the cfdump tag with query results
As you debug your CFML code, you can use the
the following format:
<cfdump var="#query_name#">
For more information on the
tag to quickly display the contents of your query. This tag has
cfdump
tag, see the CFML Reference.
cfdump
Last updated 8/5/2010
433

Advertisement

Table of Contents
loading

Table of Contents