diff options
-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 |