in reply to Problem with DBD::CSV
However, the better solution here is to use Placeholders and Bind Values. This way, the SQL engine handles the quoting and escaping for you, so you don't have to worry about what you are feeding it.SELECT animal FROM animals WHERE size = 'Big'
my $sth = $dbh->prepare(qq{ SELECT animal FROM animals WHERE size = ? }); $sth->execute('Big') or die "Cannot execute: " . $sth->errstr();
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|