Change database to a simple PDO object
This commit is contained in:
parent
c4745f0519
commit
6171363041
|
@ -1,15 +1,3 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class Database {
|
$db = new PDO('pgsql:host='.conf('db_host').';dbname='.conf('db_name'), conf('db_user'), conf('db_pass'));
|
||||||
|
|
||||||
private $db;
|
|
||||||
|
|
||||||
public function __construct() {
|
|
||||||
$this->db = new PDO('pgsql:host=db;dbname=realfan', 'realfan', 'changemeNOW');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function close() {
|
|
||||||
$this->db->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue