diff options
author | Andrew Dolgov <[email protected]> | 2017-11-19 13:03:36 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2017-11-19 13:03:36 +0300 |
commit | dfee22901d7c5defc61ef16e831d7c4a8f05ffd1 (patch) | |
tree | 19c70fcf048284decccfa9388e374047b04b14d4 /db.php | |
parent | 41e97ceb2c0e7b36ebb273707f12d2d940c87085 (diff) |
* use PDO::sqlite
* remove database-backed sessions (too slow for sqlite)
Diffstat (limited to 'db.php')
-rw-r--r-- | db.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -4,9 +4,9 @@ class Db { private $dbh; private function __construct() { - $this->dbh = new SQLite3(SCRATCH_DB); - $this->dbh->busyTimeout(30*1000); - $this->dbh->exec('PRAGMA journal_mode = wal;'); + $this->dbh = new PDO('sqlite:' . SCRATCH_DB); + //$this->dbh->busyTimeout(30*1000); + $this->dbh->query('PRAGMA journal_mode = wal;'); } public static function get() { |