queryColumnData

Returns the data in a query column. See also valueArray for use in ACF.

queryColumnData(query, columnName [, closure]) → returns array

Member Function Syntax

query.columnData(columnName [, closure])

This function requires Lucee. Not supported on Adobe ColdFusion.

queryColumnData Argument Reference

query query
Required

columnName string
Required

closure function

Examples sample code invoking the queryColumnData function

myQuery = QueryNew( '' );
names = [ 'Indra','Elizabeth','Harry','Seth' ];
queryAddColumn( myQuery,'name','varchar',names );
result = queryColumnData( myQuery,'name' );
Dump( var='#result#' );

myQuery = QueryNew( '' );
names = [ 'Indra','Elizabeth','Harry','Seth' ];
queryAddColumn( myQuery,'name','varchar',names );
result = myQuery.columnData( 'name' );
Dump( var='#result#' );

Fork me on GitHub