Esempio n. 1
0
 /**
  * Close the connection to the MySQL data source.
  * <p>Not only does this happen automatically on shutdown, but MySQL
  * also closes open connetions on shutdown.  Only one will matter since
  * the other will notice that the connection is closed and not attempt
  * to close it again.  However, it is entirely unnecessary to call
  * shutodwn() from an application that uses a MySQL data source unless
  * you want to explicitly shut down the data source.
  * @return TRUE if successful, FALSE otherwise.
  */
 function shutdown()
 {
     if (!parent::shutdown()) {
         if (!mysql_close($this->myLink)) {
             LogFatal("Unable to shut down MySQL connection: " . mysql_error());
             return FALSE;
         }
     }
     return TRUE;
 }
Esempio n. 2
0
 /**
  * Pretend to close the connection, though there is not connection to
  * close.
  * @return TRUE if successful, FALSE otherwise.
  */
 function shutdown()
 {
     if (!parent::shutdown()) {
         return !is_null($_REQUEST);
     }
     return TRUE;
 }