dj_mix_hosting_software/classes/Database.php
Cody Cook 70c8a87e15
All checks were successful
SonarQube Scan / SonarQube Trigger (push) Successful in 30s
Changes.
2024-05-19 20:01:13 -07:00

17 lines
492 B
PHP

<?php
namespace DJMixHosting;
// create a class that extends mysql database
use mysqli;
class Database extends mysqli
{
// create a constructor that takes in the config file
public function __construct($config)
{
// call the parent constructor with the config file
parent::__construct($config['database']['host'], $config['database']['user'], $config['database']['pass'], $config['database']['db'], $config['database']['port'] ?? 3306);
}
}