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.

queryColumnArray Argument Reference

query query
Required

Examples sample code invoking the queryColumnArray function


Dump array of query columns

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

Fork me on GitHub