queryColumnArray

return the column names as array, in the orders of the column in the database

queryColumnArray(query) → returns array

Member Function Syntax

query.columnArray()

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

Argument Reference

query query
Required

Examples
Sample code invoking the queryColumnArray function

news = queryNew("id,title",
	"integer,varchar", [{
		"id": 1,
		"title": "Dewey defeats Truman"
	}, {
		"id": 2,
		"title": "Man walks on Moon"
	}]
);
dump(queryColumnArray(news));

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

Fork me on GitHub