Since @bind_values is the 3rd arg and you aren't specifying \%attr, you use either undef or {} in it's place:$rv = $dbh->do($statement); $rv = $dbh->do($statement, \%attr); $rv = $dbh->do($statement, \%attr, @bind_values);
So, then what is \%attr used for? Well, search for that string in the docs and you will be lead to:$rv = $dbh->do($statement, undef, @bind_values); $rv = $dbh->do($statement, {}, @bind_values);
Notation and Conventions
The following conventions are used in this document:
$dbh Database handle object
$sth Statement handle object
... yadda yadda ...
undef NULL values are represented by undefined values in Perl
\%attr Reference to a hash of attribute values passed to methods
Do a little more research first, then ask us. :)
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to 3Re: DBI prepare() vs do() usage
by jeffa
in thread DBI prepare() vs do() usage
by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |