in reply to Placeholders, safety and the relative unimportance of efficiency
in thread SQL in Perl and setting variables

Some people will probably naively ignore this advice because they think that it's unlikely that their program will ever use a value of just a single quote...

But this issue is extremely important. You will certainly want to be able to handle more realistic values like "O'Connor" and "Smith's Bakery". If you let DBI handle the quoting for you, you will save yourself a lot of trouble fixing annoying bugs.

buckaduck

  • Comment on Re: Placeholders, safety and the relative unimportance of efficiency

Replies are listed 'Best First'.
Re: Re: Placeholders, safety and the relative unimportance of efficiency
by petdance (Parson) on Nov 20, 2001 at 02:14 UTC
    Some people will probably naively ignore this advice because they think that it's unlikely that their program will ever use a value of just a single quote...

    You can always tell the inexperienced programmers. They say things like "Oh, that'll never happen."

    xoxo,
    Andy
    --
    <megaphone> Throw down the gun and tiara and come out of the float! </megaphone>