Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <cfset outputerror.rootcause.sql = "SELECT * FROM AnyWhere WHERE Something = (param 1) and something2 = (param 2) ">
- <cfset outputerror.rootcause.where = "(param 1) = [type='IN', class='java.lang.String', value=' , '1', sqltype='CF_SQL_varchar'] , (param 2) = [type='IN', class='java.lang.String', value='2', sqltype='CF_SQL_VARCHAR'] ">
- <!--- Fix the SQL statements to include the param'd values --->
- <cfset generatedSQL = "">
- <cftry>
- <cfset tmpSQL = outputError["rootCause"]["sql"]>
- <cfset tmpParams = outputError["rootCause"]["where"]>
- <cfset arParams = reMatchNoCase("value='(.*?)', sqltype", tmpParams)>
- <cfloop from="1" to="#arParams.size()#" index="i">
- <cfset arParams[i] = arParams[i].replaceAll("value='", "").replaceAll("', sqltype", "")>
- </cfloop>
- <cfdump var="#arParams#">
- <cfcatch type="any">
- <cfdump var="#cfcatch#">
- </cfcatch>
- </cftry>
Add Comment
Please, Sign In to add comment