Help for this page

Select Code to Download


  1. or download this
    my $dbh = DBI->connect(
       'DBI:driver:database:host', 'user', 'pass',
       {RaiseError => 1, HandleError => \&bail_out},
    );
    
  2. or download this
    my $dbh = DBI->connect(
       'DBI:driver:database:host', 'user', 'pass',
    ...
    my $result = $sth->execute($username);
    
    $dbh->disconnect;
    
  3. or download this
    sub bail_out {
       my $dbh = shift;
    ...
       # prints html message
       exit(0);
    }