First commit
This commit is contained in:
commit
d5bb2f19fa
117 changed files with 68604 additions and 0 deletions
12
classes/Database.php
Normal file
12
classes/Database.php
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?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']['username'], $config['database']['password'], $config['database']['database'], $config['database']['port'] ?? 3306);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue