gavinbaumanis
01/23/2023, 12:25 AMWHERE wsq.internalName = 'NPS_response'
When I pass the string into a cfquery tag
<cfquery name="theQuery" datasource = "#customer.getDataSource()#" >
#theLastSQL#
</cfquery>
I get SQL errors - where my "where" clause above is "double quoted"
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NPS_response''
Any and ALL quoted strings - end up with an extra set of single quotes.
It isn't just this one instance - it is simply the first one - that the error gets caught up on.
Thanks.paul
01/23/2023, 12:56 AMwebsolete
01/23/2023, 1:56 AM#preserveSingleQuotes(theLastSQL)#websolete
01/23/2023, 1:57 AMgavinbaumanis
01/23/2023, 4:53 AM<cfset variables.theQuery = new query(
name = "qry",
datasource = customer.getDataSource(),
sql = "#theLastSQL#").execute().getResult() />gavinbaumanis
01/23/2023, 5:06 AMAdam Cameron
queryExecute?