Adam Cameron
database
exception?
If has queryError
and Sql
(nice capitalisation btw) there, but that is not what was sent to the DB: it's a string with the param placeholders swapped out for the data values.Adam Cameron
SELECT col FROM table WHERE id = ?
and params ["invalid"]
and I want to get those two bits of data back exactly like that, not SELECT col FROM table WHERE id = 'invalid'
which is what would be in queryError
/ Sql
in this situation.websolete
02/09/2022, 4:45 PMAdam Cameron
websolete
02/09/2022, 5:14 PMwebsolete
02/09/2022, 5:17 PMSELECT id, <cfqueryparam cfsqltype="cf_sql_varchar" value="blah"> AS hello FROM tablename WHERE id = <cfqueryparam cfsqltype="cf_sql_varchar" value="blah">
the where key in the exception contains:
(param 1) = [type='IN', class='java.lang.String', value='blah', sqltype='cf_sql_varchar'] , (param 2) = [type='IN', class='java.lang.String', value='blah', sqltype='cf_sql_varchar']
websolete
02/09/2022, 5:17 PM