Help for this page

Select Code to Download


  1. or download this
    @row_ary = $dbh->selectrow_array($statement);
    @row_ary = $dbh->selectrow_array($statement, \%attr);
    @row_ary = $dbh->selectrow_array($statement, \%attr, @bind_values);
    
  2. or download this
    use Try::Tiny;
    $dbh->{AutoCommit} = 0;  # enable transactions, if possible
    ...
        eval { $dbh->rollback };
        # add other application on-error-clean-up code here
    };
    
  3. or download this
    $dbh->{AutoCommit} = 0;  # enable transactions, if possible
    $dbh->{RaiseError} = 1;
    ...
        eval { $dbh->rollback };
        # add other application on-error-clean-up code here
    };