query

Create and populate a query object. You can initialize with data by passing arrays of data as arguments, where the argument name is the desired column name and each item in the array is the value for a row.

query() → returns query

This function requires Lucee. Not supported on Adobe ColdFusion.

Examples sample code invoking the query function

Create an empty query object

<cfscript>myQuery = query();</cfscript>

Create query object with some initial data

<cfscript>myQuery = query(foo: [1,2,3], bar: ['a','b','c']);</cfscript>

Fork me on GitHub