diff options
| author | Damien Regad <dregad@mantisbt.org> | 2023-04-16 18:24:54 +0200 |
|---|---|---|
| committer | Damien Regad <dregad@mantisbt.org> | 2023-05-22 18:19:05 +0200 |
| commit | 5c9e24cf98409004da2a5e5bd80eeec82c5a3997 (patch) | |
| tree | 3c864d794fcb0ab5ea4d165e55d9fb153fc375ae /drivers/adodb-sqlite3.inc.php | |
| parent | 86839df94adce501ff9faf8a9f6b79399e1ce56b (diff) | |
| download | adodb-5c9e24cf98409004da2a5e5bd80eeec82c5a3997.tar.gz adodb-5c9e24cf98409004da2a5e5bd80eeec82c5a3997.tar.bz2 adodb-5c9e24cf98409004da2a5e5bd80eeec82c5a3997.zip | |
Set $fetchMode property in ADORecordSet constructor
This reduces code duplication as the logic to initialize $fetchMode from
$ADODB_FETCH_MODE global was repeated in most drivers.
$adodbFetchMode is systematically initialized as well now; previously it
was only set in those drivers having specific fetch modes.
Fixes #958
Diffstat (limited to 'drivers/adodb-sqlite3.inc.php')
| -rw-r--r-- | drivers/adodb-sqlite3.inc.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/adodb-sqlite3.inc.php b/drivers/adodb-sqlite3.inc.php index 7623a3c8..822a649d 100644 --- a/drivers/adodb-sqlite3.inc.php +++ b/drivers/adodb-sqlite3.inc.php @@ -719,12 +719,9 @@ class ADORecordset_sqlite3 extends ADORecordSet { var $_queryID; /** @noinspection PhpMissingParentConstructorInspection */ - function __construct($queryID,$mode=false) + function __construct($queryID, $mode=false) { - if ($mode === false) { - global $ADODB_FETCH_MODE; - $mode = $ADODB_FETCH_MODE; - } + parent::__construct($queryID, $mode); switch($mode) { case ADODB_FETCH_NUM: $this->fetchMode = SQLITE3_NUM; @@ -736,9 +733,6 @@ class ADORecordset_sqlite3 extends ADORecordSet { $this->fetchMode = SQLITE3_BOTH; break; } - $this->adodbFetchMode = $mode; - - $this->_queryID = $queryID; $this->_inited = true; $this->fields = array(); @@ -755,7 +749,6 @@ class ADORecordset_sqlite3 extends ADORecordSet { return $this->_queryID; } - function FetchField($fieldOffset = -1) { $fld = new ADOFieldObject; |
