Fixed issues as db can't be closed now.

This commit is contained in:
Richard Underwood 2017-01-04 12:07:53 +00:00
parent e9b6a49e5a
commit f978e784d5
3 changed files with 1 additions and 9 deletions

View file

@ -51,8 +51,7 @@ function get_db() {
global $authdb, $db;
if (!isset($db)) {
$db = new SQLite3($authdb, SQLITE3_OPEN_READWRITE);
$db->exec('PRAGMA foreign_keys = 1');
open_db();
}
return $db;