Help for this page

Select Code to Download


  1. or download this
    [Sun Nov 15 02:59:17 2009] [error] [client 0.0.0.1] DBI::db=HASH(0xc40
    +d5a0)->disconnect invalidates 2 active statement handles (either dest
    +roy statement handles or call finish on them before disconnecting) at
    + /usr/lib/perl5/site_perl/5.8.8/Apache/Session/Lock/MySQL.pm line 90.
    [Sun Nov 15 02:59:20 2009] [error] [client 0.0.0.1] DBI::db=HASH(0xb1a
    +def0)->disconnect invalidates 2 active statement handles (either dest
    +roy statement handles or call finish on them before disconnecting) at
    + /usr/lib/perl5/site_perl/5.8.8/Apache/Session/Lock/MySQL.pm line 90.
    
  2. or download this
    $sth = $dbh->prepare(qq{select * from `table`});
    $sth->execute();
    my $_var = $sth->fetchrow_hashref();
    $sth->finish(); #<--- like this here...
    
  3. or download this
    my $_var = $dbh->selectrow_array(qq{select `column` from `table` where
    + `something` = ?}, undef, "somethingelse");
    # Done getting $_var no database connection right, to close right?
    
  4. or download this
    if($sess_ref) {
    $sess_ref->close(); # If there is a session open, close it
    ...
    $dbh->disconnect();
    }
    print end_html();
    
  5. or download this
    
    sub close
    ...
    my $self = shift;
        untie (%{$self});
    }