function __construct() { $db_file = DbDir() . 'users.db'; if (file_exists($db_file)) { $this->db = new SQLite3($db_file); } else { $this->db = new SQLite3($db_file); $this->Create(); } }
function __construct() { $db_file = DbDir() . 'nodes.db'; if (file_exists($db_file)) { $this->db = new SQLite3($db_file); $this->db->busyTimeout(5000); $this->db->exec('PRAGMA foreign_keys = ON'); } else { $this->db = new SQLite3($db_file); $this->db->busyTimeout(5000); $this->db->exec('PRAGMA foreign_keys = ON'); $this->Create(); } }