Close the mysqli connection when deleting the class.

This commit is contained in:
Will Rossiter 2014-03-16 16:53:13 +13:00 committed by Ingo Schommer
parent 2beb1631a5
commit 912cda9a1e

View File

@ -86,6 +86,12 @@ class MySQLDatabase extends SS_Database {
}
}
public function __destruct() {
if($this->dbConn) {
mysqli_close($this->dbConn);
}
}
/**
* Not implemented, needed for PDO
*/