Help for this page

Select Code to Download


  1. or download this
    $sth = $dbh->prepare ($sql);
    # im doing a mysql restart
    $sth->execute (); # DBD::mysql magically reconnects keeping the prepar
    +ed statement and executes
    
  2. or download this
    $sth= $dbh->prepare ($sql);
    # stoping mysql
    $sth->execute (); # DBD::mysql tries, but no connection, reconnecting 
    +and trying again will lose the $dbh->prepare
    
  3. or download this
    $sth= $dbh->prepare ($sql);
    # stoping mysql
    ...
    sleep 5; 
    MyDBI->connect_like_mysql_reconnects;
    }