queryColumnExists

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


ID column is in given query

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

Expected Result: true


Whereas "gender" is not

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

Expected Result: false


Fork me on GitHub