diff options
author | Hannes "Brolaugh" Kindströmmer <me@brolaugh.com> | 2016-03-17 00:04:01 +0100 |
---|---|---|
committer | Hannes "Brolaugh" Kindströmmer <me@brolaugh.com> | 2016-03-17 00:04:01 +0100 |
commit | 9af10c3cfdc33c743a0b4ff01f754fae76749634 (patch) | |
tree | 1257aae18b053637278a3ea2625b2b2414ccaa9d | |
parent | 07fbaf1313d083dc6a8dfdd2d88f687c826575ce (diff) | |
download | tasklist-php-9af10c3cfdc33c743a0b4ff01f754fae76749634.zip tasklist-php-9af10c3cfdc33c743a0b4ff01f754fae76749634.tar.gz tasklist-php-9af10c3cfdc33c743a0b4ff01f754fae76749634.tar.bz2 |
Added destructors to DB classes
-rw-r--r-- | App/database/Insert.php | 4 | ||||
-rw-r--r-- | App/database/Select.php | 3 | ||||
-rw-r--r-- | App/database/dbSetup.php | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/App/database/Insert.php b/App/database/Insert.php index 9c4428d..ab86a0c 100644 --- a/App/database/Insert.php +++ b/App/database/Insert.php @@ -10,7 +10,9 @@ namespace App\database; class Insert extends dbSetup{ - + public function __destruct() { + parent::__destruct(); + } /** * @param String $title * @param String $detail diff --git a/App/database/Select.php b/App/database/Select.php index 7eed63c..0c0c5f2 100644 --- a/App/database/Select.php +++ b/App/database/Select.php @@ -11,6 +11,9 @@ namespace App\database; class Select extends dbSetup { + public function __destruct() { + parent::__destruct(); + } public function getTaskWithStatus($taskID) { $stmt = $this->getDb()->prepare("SELECT * FROM task_with_status WHERE id = ?"); diff --git a/App/database/dbSetup.php b/App/database/dbSetup.php index 4bf183d..2e43f25 100644 --- a/App/database/dbSetup.php +++ b/App/database/dbSetup.php @@ -28,6 +28,9 @@ class dbSetup exit(); } } + public function __destruct() { + $this->db->close(); + } /** * @return Mysqli |