mirror of
https://github.com/e107inc/e107.git
synced 2025-08-07 23:26:41 +02:00
Added close() method to replace older db_Close() method.
This commit is contained in:
@@ -1208,23 +1208,24 @@ class e_db_mysql
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
|
||||||
* @desc Closes the mySQL server connection.<br />
|
* @desc Closes the mySQL server connection.<br />
|
||||||
* <br />
|
* <br />
|
||||||
* Only required if you open a second connection.<br />
|
* Only required if you open a second connection.<br />
|
||||||
* Native e107 connection is closed in the footer.php file<br />
|
* Native e107 connection is closed in the footer.php file<br />
|
||||||
* <br />
|
* <br />
|
||||||
* Example :<br />
|
* Example :<br />
|
||||||
* <code>$sql->db_Close();</code>
|
* <code>$sql->db_Close();</code>
|
||||||
*
|
*
|
||||||
* @access public
|
* @access public
|
||||||
*/
|
* @return void
|
||||||
function db_Close()
|
*/
|
||||||
|
function close()
|
||||||
{
|
{
|
||||||
if(!$this->mySQLaccess)
|
if(!$this->mySQLaccess)
|
||||||
{
|
{
|
||||||
global $db_ConnectionID;
|
global $db_ConnectionID;
|
||||||
$this->mySQLaccess = $db_ConnectionID;
|
$this->mySQLaccess = $db_ConnectionID;
|
||||||
}
|
}
|
||||||
e107::getSingleton('e107_traffic')->BumpWho('db Close', 1);
|
e107::getSingleton('e107_traffic')->BumpWho('db Close', 1);
|
||||||
$this->mySQLaccess = NULL; // correct way to do it when using shared links.
|
$this->mySQLaccess = NULL; // correct way to do it when using shared links.
|
||||||
@@ -1232,6 +1233,15 @@ class e_db_mysql
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BC Alias of close()
|
||||||
|
*/
|
||||||
|
function db_Close()
|
||||||
|
{
|
||||||
|
$this->close();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int number of affected rows, or false on error
|
* @return int number of affected rows, or false on error
|
||||||
* @param string $table
|
* @param string $table
|
||||||
|
Reference in New Issue
Block a user