ilovetorun
Programmer
Many times I use WHERE clauses in queries which are quite long and complex. Sometimes it becomes necessary to use the same lengthy WHERE clause in my main query and several subqueries, and I've found that in certain circumstances, I can use a variable (set up using CFSET) to represent my WHERE clause.
The difficult arises when I need to use single-quotes in the WHERE clause - for some reason, the CF interpreter turns all of the single-quotes in my CFSET command into double-quotes when I insert that variable into my query.
Is there a way to suppress this function, and get the interpreter to put in single-quotes when it interprets the variable?
The difficult arises when I need to use single-quotes in the WHERE clause - for some reason, the CF interpreter turns all of the single-quotes in my CFSET command into double-quotes when I insert that variable into my query.
Is there a way to suppress this function, and get the interpreter to put in single-quotes when it interprets the variable?