in reply to Re: mySQL with Perl
in thread mySQL with Perl

"?"-placeholders are a lot cleaner, and use the same quote() internally.

$sth = $dbh->prepare('SOME QUERY WITH (' . $dbh->quote($foo) . ', ' . $dbh->quote($bar) . ')'; $sth->execute(); ### $sth = $dbh->prepare('SOME QUERY WITH (?, ?)'); $sth->execute($foo, $bar); ### And if you really, really want to quote() yourself, ## at least use join and map to make easy additions # possible: $sth = $dbh->prepare('SOME QUERY WITH (' . join(', ', map $dbh->quote($_), $username, $password, $email, $name, $url, $time ) . ');'; # But still, placeholders ARE better!

++ vs lbh qrpbqrq guvf hfvat n ge va Crey :)
Nabgure bar vs lbh qvq fb jvgubhg ernqvat n znahny svefg.
-- vs lbh hfrq OFQ pnrfne ;)
    - Whreq