queryColumnList

Returns the column names of a query as a list.

queryColumnList(query [, delimiter]) → returns string

Member Function Syntax

query.columnList([delimiter])

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

Argument Reference

query query
Required

delimiter string
Default: ,

Examples
Sample code invoking the queryColumnList function

myQuery = queryNew( 'ID,name,age' );
writeOutput( queryColumnList( myQuery ) );

Expected Result: ID,name,age

myQuery = queryNew( 'ID,name,age' );
writeOutput( myQuery.columnList() );

Expected Result: ID,name,age

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

Fork me on GitHub