Use the connect method in the constructor.

This commit is contained in:
markjcrane
2016-04-16 00:27:24 -06:00
parent a2b6f24a36
commit 09d304a1aa

View File

@@ -54,9 +54,7 @@ if (!class_exists('scripts')) {
//connect to the database if not connected
require_once "resources/classes/database.php";
$database = new database;
if (!$this->db) {
$database->connect();
}
$database->connect();
$this->db = $database->db;
$this->db_type = $database->type;
$this->db_name = $database->db_name;