queryColumnCount

Returns the amount of all columns in the given query object

queryColumnCount(query) → returns numeric

Member Function Syntax

query.columnCount()

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

query query
Required

Examples
Sample code invoking the queryColumnCount function

myQuery = queryNew("ID,name,age");
writeOutput( queryColumnCount( myQuery ) );

Expected Result: 3

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

Fork me on GitHub