Change database to a simple PDO object

master
Bofh 1 year ago
parent c4745f0519
commit 6171363041

@ -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'));

Loading…
Cancel
Save