queryRecordCount

Returns the number of rows given in the query object result set

queryRecordCount(query) → returns numeric

Member Function Syntax

query.recordCount()

Argument Reference

query query
Required

Compatibility

ColdFusion:

Version 2018.0.5+ New function in Update 5

Examples
Sample code invoking the queryRecordCount function

heroes = queryNew("id,Name",
            "integer,varchar",
            [
                {"id":1,"Name":"Bruce Banner"},
                {"id":2,"Name":"Tony Stark"},
                {"id":3,"Name":"Bobby Drake"},
                {"id":4,"Name":"Jean Grey"}
            ]
            )
    writeDump(heroes.recordCount());

Expected Result: 4

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub