mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +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 />
|
||||
* <br />
|
||||
* Only required if you open a second connection.<br />
|
||||
* Native e107 connection is closed in the footer.php file<br />
|
||||
* <br />
|
||||
* Example :<br />
|
||||
* <code>$sql->db_Close();</code>
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
function db_Close()
|
||||
|
||||
* @desc Closes the mySQL server connection.<br />
|
||||
* <br />
|
||||
* Only required if you open a second connection.<br />
|
||||
* Native e107 connection is closed in the footer.php file<br />
|
||||
* <br />
|
||||
* Example :<br />
|
||||
* <code>$sql->db_Close();</code>
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function close()
|
||||
{
|
||||
if(!$this->mySQLaccess)
|
||||
{
|
||||
global $db_ConnectionID;
|
||||
$this->mySQLaccess = $db_ConnectionID;
|
||||
$this->mySQLaccess = $db_ConnectionID;
|
||||
}
|
||||
e107::getSingleton('e107_traffic')->BumpWho('db Close', 1);
|
||||
$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
|
||||
* @param string $table
|
||||
|
Reference in New Issue
Block a user