Change database to a simple PDO object

This commit is contained in:
Bofh 2021-11-26 01:39:17 +01:00
parent c4745f0519
commit 6171363041
1 changed files with 1 additions and 13 deletions

View File

@ -1,15 +1,3 @@
<?php
class Database {
private $db;
public function __construct() {
$this->db = new PDO('pgsql:host=db;dbname=realfan', 'realfan', 'changemeNOW');
}
public function close() {
$this->db->close();
}
}
$db = new PDO('pgsql:host='.conf('db_host').';dbname='.conf('db_name'), conf('db_user'), conf('db_pass'));