Guest User

Untitled

a guest
Aug 16th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <cfset outputerror.rootcause.sql = "SELECT * FROM AnyWhere WHERE Something = (param 1) and something2 = (param 2) ">
  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'] ">
  3.  
  4. <!--- Fix the SQL statements to include the param'd values --->
  5. <cfset generatedSQL = "">
  6. <cftry>
  7. <cfset tmpSQL = outputError["rootCause"]["sql"]>
  8. <cfset tmpParams = outputError["rootCause"]["where"]>
  9. <cfset arParams = reMatchNoCase("value='(.*?)', sqltype", tmpParams)>
  10. <cfloop from="1" to="#arParams.size()#" index="i">
  11. <cfset arParams[i] = arParams[i].replaceAll("value='", "").replaceAll("', sqltype", "")>
  12. </cfloop>
  13. <cfdump var="#arParams#">
  14. <cfcatch type="any">
  15. <cfdump var="#cfcatch#">
  16. </cfcatch>
  17. </cftry>
Add Comment
Please, Sign In to add comment