ColdFusion CFquery - How to use RecordCount

cfquery - RecordCount

cfqueryRecordCount.cfm


<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfquery tag example: using RecordCount</title>
</head>

<body>
<h2 style="color:hotpink">cfquery example: how to use RecordCount</h2>

<cfquery name="qBooks" datasource="cfbookclub">
 SELECT BookID, Title FROM BOOKS
</cfquery>
<cfoutput><b>Total Books: #qBooks.RecordCount#</b></cfoutput>
<cfdump var="#qBooks#">
</body>
</html>





More ColdFusion examples