Returns the data in a query column. See also valueArray for use in ACF.
queryColumnData(query, columnName [, closure])
→ returns array
query.columnData(columnName [, closure])
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#' );
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.