queryDeleteColumn

Deletes a column within a query object.

queryDeleteColumn(query, column) → returns array

Member Function Syntax

query.deleteColumn(column)

Argument Reference

query query
Required

Query to modify

column string
Required

Name of the column to delete

Examples
Sample code invoking the queryDeleteColumn function

Builds a simple query and removes the 'id' column.

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

Expected Result: {"COLUMNS":["TITLE"],"DATA":[["Dewey defeats Truman"],["Man walks on Moon"]]}

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

Fork me on GitHub