summaryrefslogtreecommitdiff
path: root/adodb.inc.php
AgeCommit message (Collapse)AuthorFilesLines
2025-08-18PHPDoc: ADODB_ASSOC_CASE constants match PHP'sDamien Regad1-3/+5
2025-08-11Added docblock to core methodMark Newnham1-0/+8
2025-04-08Clarify/correct the @return documentation for some functionsPhil Sainty1-4/+4
- Document false instead of bool if the function cannot return true Many other functions document <foo>|false - Correct the @return description for GetCol()
2024-12-23Fix typosAndreas Deininger1-6/+6
2024-08-31PHPDocDamien Regad1-1/+3
2024-03-22Coding guidelinesDamien Regad1-84/+54
2024-03-22Merge branch 'hotfix/5.22'Damien Regad1-3/+5
2024-03-22Fix getAssoc() with ADODB_FETCH_DEFAULT modeDamien Regad1-3/+5
With mysqli (and possibly with other drivers where driver-specific fetchMode values are different from ADOdb's as well, but this has not been tested), getAssoc() would not return the expected key=>value pairs when fetch mode was set to ADODB_FETCH_DEFAULT. We now use ADORecordSet::$adodbFetchMode property as reference fetch mode instead of the driver-specific ADOConnection::$fetchMode (which is often not set), and check it against both ADODB_FETCH_BOTH and ADODB_FETCH_DEFAULT. Fixes #1023
2024-01-12Fix static analysis warningsDamien Regad1-8/+7
2024-01-10Bump version to 5.22.8-devDamien Regad1-1/+1
2023-11-18Add missing ADOConnection::_*connect() methodsDamien Regad1-4/+42
Internal, low-level connection methods are driver-specific, but they nevertheless need to be declared in the parent ADOConnection class, in order to define a common signature and avoid potentially polymorphic calls. _nconnect() exists, but the _connect() and _pconnect() methods were missing. The _connect() method is defined as abstract to force its implementation in the child Driver classes. Since they are for internal use, all 3 methods are declared as protected (in ADOConnection only, not in child classes - for now). Note that this does not actually break backwards compatibility, as PHP allows child classes to relax the visibility (i.e. redeclare the methods as public). At some point we'll need to align this across the library. Fixes #1013
2023-11-04Bump version to 5.22.7v5.22.7Damien Regad1-1/+1
2023-10-18Remove remaining ADOdb date/time function callsJoe Bordes1-15/+14
This is a follow-up on commit bffa42e206d758af3095b8a0bdbf3c3ad8fb5e51. Following removal of adodb-time library, some function calls were not cleaned up in the code base. This fixes that. Includes a standalone test script to validate the functionality. Fixes #970 (PR #1002)
2023-06-12Bump version to 5.22.7-devDamien Regad1-1/+1
2023-06-11PHPDocDamien Regad1-18/+14
2023-06-11Rename fetchObj methods to camelCaseDamien Regad1-6/+6
2023-06-11Refactor fetchObject, remove unused propertiesDamien Regad1-22/+7
Code is simplified using the new ADOFieldObj constructor. The ADORecordSet properties $_obj and $_names are no longer needed and have been removed. Issue #982
2023-06-11Add magic methods to ADOFetchObjDamien Regad1-8/+46
This allows hanlding of dynamic properties for PHP 8.2 compatibility, without relying on the AllowDynamicProperties attribute. The constructor accepts an array of (fieldname => value) pairs for easy initialization. Fixes #982
2023-06-11Bump version to 5.22.6v5.22.6Damien Regad1-1/+1
2023-06-11Set AllowDynamicProperties attribute on ADOFetchObj classhschletz1-0/+1
Avoid deprecation warning on PHP 8.2. Fixes #975, as temporary workaround for #982 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-05-22Set $fetchMode property in ADORecordSet constructorDamien Regad1-6/+15
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
2023-05-18Remove Date/Time LibraryDamien Regad1-7/+0
It does not make much sense anymore in the age of 64-bit computing, where timestamps will not overflow for 292 billion years... Fixes #970
2023-05-18Merge branch 'hotfix/5.22'Damien Regad1-1/+13
2023-04-30Define ADOConnection::_query() methodDamien Regad1-0/+12
- Update child classes to be consistent with this declaration. - Remove unnecessary, non-PHPDoc comments - Consistent parameter names Fixes #966
2023-04-30PHPDoc: fix ADOConnection::execute() return typeDamien Regad1-1/+1
Remove redundant PHPDoc block in child classes ADODB_mysqli, ADODB_oci8. Fixes #964
2023-04-18Fix bad merge conflict resolutionDamien Regad1-14/+24
Merge commit 917c54ec9d0df1bb34fe80a71336b446f09d74ae did not resolve conflicted adodb.inc.php correctly: changes in the hotfix/5.22 branch were simply ignored instead of being selectively applied. As a result, the fix for #954 and some PHPDoc improvements were not applied. Fixes #960
2023-04-15Add missing AODRecordSet::$rowsPerPage declarationDamien Regad1-1/+2
Fixes #954
2023-04-15PHPDocDamien Regad1-14/+23
2023-04-15Bump version to 5.22.6-devDamien Regad1-1/+1
2023-04-08Simplify ADOConnection::outp()Damien Regad1-9/+3
Only append newline (`<br>` or `\n` depending on HTML/CLI output) when necessary, instead of always adding a `<br>` and stripping tags afterwards for CLI.
2023-04-08PHPDoc for ADOConnection::$debugDamien Regad1-1/+23
2023-04-03Bump version to 5.22.5v5.22.5Damien Regad1-1/+1
2023-03-17Merge branch 'hotfix/5.22'Damien Regad1-10/+62
2023-03-17PHPDocDamien Regad1-3/+15
2023-03-17Remove safe mode referencesDamien Regad1-6/+3
safe_mode was deprecated in PHP 5.3 and removed in 5.4. This removes remaining references to it in the code. Fixes #934
2023-03-17Fix PHP 8.2 dynamic properties deprecation warningsDamien Regad1-1/+40
- ADOConnection: add $_metars, $locale, $metaColumnsSQL, $identitySQL, $_genSeqSQL, $_dropSeqSQL and $_genIDSQL; add PHPDoc to $metaDatabasesSQL $metaTablesSQL - Exceptions: add $msg property - DB2: reference parent connection object and fix $_queryID case - Informix: don't cache version info in SetVersion - odbtp: define $odbc_name, $_canSelectDb, $_lastAffectedRows properties NOTE: this is somewhat academical as the driver is obsolete - oci8: define $_refcursor property - sybase: use existing $hasTransactions property instead of $_hastrans - text: rename unused ADOConnection::$_evalAll property to $evalAll - perf: define $settings property - xml: add properties dbTable::$currentPlatform, dbTable::$data, dbData::$current_field, adoSchema:$obj This is adapted from changes proposed in #926
2023-03-17Define ADOConnection::$connectStmtDamien Regad1-0/+4
Adapt the few drivers that were previously using this property. Fixes dynamic properties deprecation in PHP 8.2 Based on original submission in PR #926
2023-03-12Allow dynamic properties for ADOFieldObject classDamien Regad1-1/+5
Fixes #906
2023-03-12Define a few common properties in ADOFieldObjectDamien Regad1-0/+10
Fixes #906
2023-03-12Merge branch 'hotfix/5.22'Damien Regad1-2/+22
# Conflicts: # adodb.inc.php
2023-03-12PHPDoc add variable type hintDamien Regad1-0/+1
Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-03-12Define ADORecordSet::$insertSigDamien Regad1-0/+2
Fixes PHP 8.2 Deprecated warning: Creation of dynamic property. Fixes #908 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-03-12Define ADORecordSet::$tableNameDamien Regad1-0/+6
Fixes PHP 8.2 Deprecated warning: Creation of dynamic property. Fixes #909 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-03-12Fix PHP 8.2 deprecation warnings + PHPDoc fixesDamien Regad1-0/+6
Cherry picked from commits feadc3df1fdb199bbef50eb404f81b7d78f94c79 and 5e41924806e5f310d30e203100f0c97cd5e93893. # Conflicts: # adodb.inc.php Creation of dynamic property - ADORecordset_sqlite3::$adodbFetchMode in adodb-sqlite3.inc.php (#911) - ADOFieldObject::$scale in adodb-sqlite3.inc.php (#912) Partially-supported callable - in adodb-pdo-inc.php (#928)
2023-03-12Remove deprecated $databaseName propertyDamien Regad1-1/+8
ADOConnection::$databaseName was marked as obsolete in ADOdb 4.66. Since the assignment that was kept for backwards-compatibility in the ADOConnection::selectDB() method is causing deprecation warnings with PHP 8.2, now is the time to get rid of it. The 2018 rewrite of DB2 driver introduced a private $databaseName property; this has been removed in favor of ADOConnection::$database. Fixes #932, #904 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-03-12Fix PHPDocDamien Regad1-11/+12
2023-03-12Fix PHP 8.2 deprecation warningsMark Newnham1-0/+4
Creation of dynamic property - ADORecordset_sqlite3::$adodbFetchMode in adodb-sqlite3.inc.php (#911) - ADOFieldObject::$scale in adodb-sqlite3.inc.php (#912) Partially-supported callable - in adodb-pdo-inc.php (#928) --------- This is a re-do of fa572e96d20ac233e9dfc2d8f770234475381107 (PR #921) with an improved commit message. Co-authored-by: raortegar <raquel.ortega@moodle.com> Signed-off-by: Damien Regad <dregad@mantisbt.org>
2023-03-12Revert commit fa572e96d20ac233e9dfc2d8f770234475381107Damien Regad1-4/+0
Nothing wrong with the code changes, but the commit message is bit of a mess, so I'll re-apply it after rewording.
2023-02-25912 sqlite deprecated creation of dynamic property adofieldobject%24scale is ↵Mark Newnham1-0/+4
deprecated in driversadodb sqlite3incphp on line 194 (#931) * Fixed Partially-supported callable are deprecated in PHP 8.2 * Fix deprecated undefined property #912 #911 #920 #923 --------- Co-authored-by: raortegar <raquel.ortega@moodle.com>
2023-01-19Merge branch 'hotfix/5.22'Damien Regad1-18/+16