First, read the Perl DBI documentation that is relevant:
perldoc DBD::Pg
perldoc DBI
Your examples do not make sense. You "prepare" a SQL statement, not just
data. E.g.:
$sth = $dbh->prepare("INSERT INTO test3(nameval, boolval) VALUES (?, ?)")
or die($sth->errstr);
foreach my $nm ('Joe', 'Fr
On Aug 30, 2007, at 4:03 AM, Ow Mun Heng wrote:
2. how do I perform a list of SQL using transactions. eg: like above,
but wrap it into a transaction.
assuming $dbh is your open handle to the database via DBI, then you
do something like this:
$dbh->begin_work() or die;
$sth = $dbh->prepare