public $pdo;
public $options = [ # See: http://php.net/manual/en/pdo.error-handling.php
PDO::ATTR_ERRMODE => DB_DEFAUL_ERRMODE,
+ PDO::ATTR_TIMEOUT => 3600,
];
public $host = null;
public $port = null;
# Add args to pdo
foreach ([
- 'host' => 'host',
- 'port' => 'port',
- 'user' => 'user',
+ 'host' => 'host',
+ 'port' => 'port',
+ 'user' => 'user',
'password' => 'password',
- 'name' => 'dbname',
- 'charset' => 'charset',
+ 'name' => 'dbname',
+ 'charset' => 'charset',
] as $k => $v) {
if ($v=='charset' and $this->type=='pgsql') continue;
if (empty($this->$k)) continue;