mirror of
https://github.com/vrana/adminer.git
synced 2025-08-06 14:46:36 +02:00
SQLite: Fix non-PDO driver after 99163fe
This commit is contained in:
@@ -8,8 +8,8 @@ if (isset($_GET["sqlite"])) {
|
||||
if (class_exists("SQLite3") && $_GET["ext"] != "pdo") {
|
||||
|
||||
class SqliteDb {
|
||||
public $extension = "SQLite3", $server_info, $affected_rows, $errno, $error;
|
||||
private $link;
|
||||
public $extension = "SQLite3", $flavor = '', $server_info, $affected_rows, $errno, $error;
|
||||
private $link, $result;
|
||||
|
||||
function __construct($filename) {
|
||||
$this->link = new \SQLite3($filename);
|
||||
@@ -38,10 +38,19 @@ if (isset($_GET["sqlite"])) {
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function multi_query($query) {
|
||||
return $this->result = $this->query($query);
|
||||
}
|
||||
|
||||
function store_result() {
|
||||
return $this->result;
|
||||
}
|
||||
|
||||
function next_result() {
|
||||
return false;
|
||||
}
|
||||
|
||||
function result($query, $field = 0) {
|
||||
$result = $this->query($query);
|
||||
if (!is_object($result)) {
|
||||
@@ -100,8 +109,6 @@ if (isset($_GET["sqlite"])) {
|
||||
|
||||
if (class_exists('Adminer\SqliteDb')) {
|
||||
class Db extends SqliteDb {
|
||||
public $flavor = '';
|
||||
|
||||
function __construct() {
|
||||
parent::__construct(":memory:");
|
||||
$this->query("PRAGMA foreign_keys = 1");
|
||||
|
Reference in New Issue
Block a user