Help for this page

Select Code to Download


  1. or download this
    # declare a db handle
    # get a lock on the table
    # call a subroutine from the module that does something to the db
    # unlock the table
    
  2. or download this
    use dbmodule;
    my $dbh;
    BEGIN {$dbh = DBModule_Start}
    ...
    $sth = $dbh->prepare("BLAH BLAH") die $dbh->errstr;
    $sth->execute or die $dbh->errstr;
    DBModule_Sub1;
    
  3. or download this
    my $module_dbh;
    
    ...
    {
        $module_dbh->disconnect;
    }