queryColumnExists

Checks whether a column exists in the given query object

queryColumnExists(query, column) → returns boolean

Member Function Syntax

query.columnExists(column)

This function requires Lucee. Not supported on Adobe ColdFusion.

queryColumnExists Argument Reference

query query
Required

column string
Required

Examples sample code invoking the queryColumnExists function

myQuery = queryNew("ID,name,age");
writeOutput(queryColumnExists(myQuery,"ID"));

Expected Result: true

myQuery = queryNew("ID,name,age");
writeOutput(queryColumnExists(myQuery,"gender"));

Expected Result: false


Fork me on GitHub