- or download this
sub runSomeQueries
...
$sth->execute($locationID);
}
- or download this
my $dbh_primary = DBI->connect(XXXX);
my $dbh_backup = DBI->connect(YYYY);
runSomeQueries($dbh_primary);
runSomeQueries($dbh_backup);
- or download this
my $dbh = DBI->connect(XXXX);
my $dbh_tx = DBI->connect(XXXX, AutoCommit => 0);
...
{
$dbh->rollback();
}