Change database to a simple PDO object
This commit is contained in:
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…
Reference in New Issue