dj_mix_hosting_software/classes/Database.php
2024-04-29 21:16:49 -07:00

12 lines
No EOL
448 B
PHP

<?php
// create a class that extends mysql database
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);
}
}