QueryRecordCount

Description

Calculates the number of rows in a query object.

Returns

The number of rows in a query.

Category

Syntax

QueryRecordCount(Object query)

Member functions

queryObject.RecordCount()

See also

History

ColdFusion (2018 release) Update 5: Added the function and the member function len().

Parameters

Parameter

Required/Optional

Description

query

Required

The query object whose rows are to be counted.

Example

<cfscript>
 myQuery1=queryNew("empid,depid,name", "integer,integer,varchar",[
    [10, 101, "John"],
    [20, 120, "James"],
    [30, 205, "Peter"]
    ]);
 writeoutput(QueryRecordCount(myQuery1)) // Returns 3
 writeoutput(myquery1.getRecordCount()) // Returns 3
 writeoutput(myquery1.len()) // Returns 3
 writeoutput(myquery1.RecordCount) // Returns 3
</cfscript>

Get help faster and easier

New user?