in reply to Re: DBI Conundrum Using CGI::App
in thread DBI Conundrum Using CGI::App

Your ignorance? I think that the rule is that you only quote when you have to, and bind your parameters at all other times. Which pretty much means a borked driver, I think, where it doesn't handle quoting for you, and neither does the database backend (if any). So, if anything, your only ignorance might be saying you're ignorant about using ? instead of quote ;-)

Update: ok, that might have been confusing. You're absolutely right - use ? over quote(). Everytime. Unless, of course, the DBD doesn't support ?.

Replies are listed 'Best First'.
Re^3: DBI Conundrum Using CGI::App
by eric256 (Parson) on Jul 06, 2006 at 20:46 UTC

    Jsut to clafiy, because now you've confused me: I use ? and it seems to quote exactly when i would expect it to. Which means treating numbers correctly. I avoid ->quote() as much as possible becuase it didnt' seem to DWIM as often as ? did and ? looks better to me. ;) So I think that the OP might need to say column="$quoted_string" or column  = ? and pass it an unquoted string.


    ___________
    Eric Hodges