After looking up Binding values, I understand that its inefficient using interpolating values especially when executing the script multiple times as it doesnt use cached info but besides the inefficiency are there other drawbacks to interpolating?
While the efficiency gain is good, the primary reason I use placeholders is escaping. You can very easy corrupt data values through naive interpolation, and that doesn't even get into the security risk of SQL injection (oblig xkcd://327). It also makes debugging easier, since it uncouples the SQL syntax errors from the parameter value validity. I never interpolate values into my SQL.
Also, the errors I get do not seem to be caught by the exception handler. Any insight on that?
I'm glad you apparently tracked down your errors, though I am very surprised that the exception handler wasn't catching those expressions.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
In reply to Re^3: DB Exception Handling
by kennethk
in thread DB Exception Handling
by sowais
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |