see
the perldoc documentation for a more robust example):
$dbh->{AutoCommit} = 0; #assuming that AutoCommit was previously set to
1
$sth = $dbh->prepare("INSERT INTO test3(nameval, boolval) VALUES (?, ?)");
foreach my $nm ('Joe', 'Fred', 'Sam') {
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
Hi all,
I'm sure some of you guys do perl-dbi to access perl. need some
pointers. (pg specific I guess)
1. Possible to execute queries to PG using multiple statemments?
eg:
prepare("A")
bind_param($A)
execute()
prepare("BB")
bind_param($B)
execute()
prepare("CC")
bind_param($B)
execute()
right