in reply to Escaping Single Quote using Bind and $dbh->quote
What craps out? Where is your code?
My preferred way of dealing with escaping is to always use placeholders
my $sth = $dbh->prepare(q{INSERT INTO sales (product_code, qty, price) + VALUES (?, ?, ?)}; $sth->execute($product, $qty, $price) or die $dbh->errstr;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Escaping Single Quote using Bind and $dbh->quote
by chrestomanci (Priest) on Apr 04, 2011 at 20:33 UTC | |
by locked_user sundialsvc4 (Abbot) on Apr 05, 2011 at 00:40 UTC |