summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2021-04-11WhitespaceDamien Regad10-561/+562
2021-04-11mssql: enable InsertID capability by defaultDamien Regad1-4/+5
Fixes #692
2021-04-11Add loop to get the last resultDamien Regad1-2/+5
Server may return more than one row if triggers are involved (see #41).
2021-04-11mssql: enable _insertID() againDamien Regad1-25/+70
In ADOdb 5.21.0, for performance reasons [1] the _query() method no longer retrieves the last inserted Id. This introduced a regression, as it was only possible to retrieve the Insert Id for "normal" queries, but not parameterized ones as Insert_ID() always returned null in this case. To maintain the driver's performance, we now allow the client to decide whether insert queries should execute the extra SCOPE_IDENTITY() call, by providing a new enableLastInsertID() method. Fixes #692 [1]: https://github.com/ADOdb/ADOdb/issues/185#issuecomment-169057606
2021-04-11Add stub for ADOConnection::_insertID()Damien Regad21-39/+40
Update child classes so method signature matches the parent's.
2021-03-27PHP 8: final private makes no sense, throwing warningEloy Lafuente (stronk7)3-4/+4
Ref: https://php.watch/versions/8.0/final-private-function#final-private Fixes #711
2021-03-27mysqli: catch invalid parameters in _connect()Damien Regad1-7/+9
Make sure the parameter is numeric, to prevent PHP Warning or TypeError exception when calling mysqli_options(), and if the call fails (e.g. because an unsupported option constant was provided, throw an exception or display an error message instead of silently failing. Fixes #693
2021-03-27mysqli: override setConnectionParameter()Damien Regad1-0/+21
Add error handling for $parameter type: since mysqli_options() requires an integer, the function now fails and returns false (or throws an exception if enabled) when given a non-numeric value. Fixes #693
2021-03-27WhitespaceDamien Regad1-8/+8
2021-03-15pdo: ensure bind parameters are presented in a numeric arrayMark Newnham1-0/+4
Fixes #705 (cherry picked from commit fd4d6b09577ba461f522ca8f41a717c5c0a1428b)
2021-03-11WhitespaceDamien Regad1-39/+35
2021-03-08Bump version to 5.21.1-devDamien Regad59-59/+59
2021-03-08Refactoring getCharSet and setCharSetDamien Regad2-16/+7
Simplify the code in mysqli and postgres7 drivers, and get rid of unnecessary `@` error suppresion.
2021-03-08get/setCharSet: avoid TypeError when no connectionDamien Regad2-5/+7
On mysqli, PHP 8 throws an 'Uncaught TypeError: method_exists(): Argument 1 ($object_or_class) must be of type object|string, bool given'. Checking that _connectionID is set fixes the problem. A similar issue was found and fixed with the postgres7 driver as well. Note that fixing the legacy mysql driver is not necessary, as the driver has been removed in PHP 7, and the error suppression operator should do the job on PHP 5. Fixes #686
2021-03-08get/setCharset: camelCase, PHPDoc, param consistencyDamien Regad3-41/+43
2021-02-27Bump version to 5.21.0v5.21.0Damien Regad59-59/+59
2021-02-26pgsql: Fix param(0) returning invalid $0 placeholderDamien Regad1-6/+10
Allowing param(false) to reset the query parameter count (see #380, commit 46fa66c10dc50547167d0f8bbbcb6484edf30d1c) introduced a regression when a falsy value was used, like `param(0)` in adodb-session2.php. ADODB_postgres64::param() now differenciates betwen use of: - falsy value -> reset count and return the first placeholder ($1) - boolean `false` -> reset count, do not return placeholder (next call will return $1). Updated PHPDoc for parent ADOConnection::param() to reflect this. Fixes #682, #380
2021-02-02Bump version to 5.21.0-rc.1v5.21.0-rc.1Damien Regad59-59/+59
2021-01-25Remove all magic quotes related codeDamien Regad7-121/+101
The $magic_quote parameter for public methods was kept for backwards compatibility purposes, but is no longer used. Fixes #674
2021-01-25Merge branch 'hotfix/5.20' into release/5.21Damien Regad1-1/+1
# Conflicts: # adodb.inc.php
2021-01-24text: fix Cannot pass parameter by reference (#668)peterdd1-1/+1
2021-01-24Merge branch 'hotfix/5.20' into release/5.21Damien Regad2-3/+8
# Conflicts: # adodb-xmlschema03.inc.php # adodb.inc.php # drivers/adodb-pdo.inc.php
2021-01-24metaIndexes does not return primary key correctly, see #656 (#660)Mark Newnham1-8/+72
The primary key parameter was reversed . In addition, the method tried to obtain primary key information from the sqlite_master table, instead of the pragma (cherry picked from commit 45a1d6a567727a846fe2fa218c3f77dbc77464fc)
2021-01-24Fix undefined variableDamien Regad1-2/+2
ADODB_pdo::setTransactionMode was calling its parent with an undefined $seqname variable.
2021-01-24pdo: Fix Fatal error in _query()Damien Regad1-1/+3
On PHP 8, ADODB_pdo::_query() throws the following error: Fatal error: Uncaught Error: Attempt to assign property "debug" on null in adodb/drivers/adodb-pdo.inc.php:499 Only perform the assignment if _driver is not null. Fixes #666
2021-01-24pgsql: Fix Fatal error in _close() methodDamien Regad1-1/+6
On PHP 8, ADORecordSet_postgres64::_close() throws the following error: Uncaught TypeError: pg_free_result(): Argument #1 ($result) must be of type resource, bool given in drivers/adodb-postgres64.inc.php:1052. Adding a check to ensure _QueryID is a ressource of the expected type, before calling pg_free_result(). Fixes #666
2021-01-02Merge branch 'hotfix/5.20' into release/5.21Damien Regad1-3/+3
Conflicts: drivers/adodb-postgres64.inc.php
2021-01-02pgsql: fix deprecated function aliasesDamien Regad1-4/+4
Fixes #667
2020-12-20Replace adodb_str_replace() calls with str_replace()peterdd3-5/+5
Fixes #646
2020-12-20Bump version to 5.21.0-beta.1v5.21.0-beta.1Damien Regad59-59/+59
2020-12-19adodb.org is now served over SSLDamien Regad36-36/+36
Change web site references from http://adodb.org to https.
2020-12-16Merge branch 'hotfix/5.20' (v5.20.19)Damien Regad1-3/+23
Note on merge conflict in adodb.inc.php: At line 5133, parse_url() is called with `@` operator in the hotfix/5.20 branch (commit 2026e66e86f35995eee32557c2f83f1d539ca9c7) whereas the same change in the master branch (commit c1a6794ece2b02c2a5d238159ae85da3cbd6d) is without it. Code was kept as it is in master. # Conflicts: # adodb-lib.inc.php # adodb.inc.php # drivers/adodb-mssqlnative.inc.php # drivers/adodb-mysqli.inc.php # drivers/adodb-pdo.inc.php
2020-12-16Reset version to avoid merge conflictsDamien Regad56-56/+56
2020-12-14Bump version to 5.20.19Mark Newnham56-56/+56
2020-12-12Mysqli metacolumns (#653)Mark Newnham1-0/+20
* Add support for MySQL Version 8. See #642 The metacolumns function returns the incorrect type for unsigned integers because it doesn't include the length in MySQL 8 * Metacolumns returns wrong type for integer fields in Mysql 8 #642
2020-12-11@mnewnham Add support for specific SQL Server connection port. See #624 …Mark Newnham1-1/+8
Enhancement allows use of a specfic database connection port
2020-12-11Add support for specific SQL Server connection port. See #624Mark Newnham1-0/+7
Enhancement allows use of a specfic database connection port
2020-12-06Removed references to phplens.com, see #564Mark Newnham5-7/+7
2020-12-06Removed hotlinks to PHPlens see #564Mark Newnham6-8/+8
Site no longer active
2020-12-06Adds support for PDO Constructor parameters see #650Mark Newnham1-2/+17
The PDO driver now supports persistent connections via the **pconnect()** method as well as other constuctor options via the **pdoOptions** class variable. See the ADOdb PDO documentation for more information.
2020-12-06Adds support for PDO Constructor parameters see #650Mark Newnham1-1/+17
The PDO driver now supports persistent connections via the **pconnect()** method as well as other constuctor options via the **pdoOptions** class variable. See the ADOdb PDO documentation for more information.
2020-12-03PHP7.4 requires definition of variable see #637Mark Newnham1-2/+4
PHP7.4 requires definition of variable before accessing array offsets
2020-12-03PHP7.4 requires definition of variable see #637Mark Newnham1-2/+4
PHP7.4 requires definition of variable before accessing array offset
2020-08-02Merge branch 'hotfix/5.20' (v5.20.18)Damien Regad1-5/+1
# Conflicts: # docs/changelog.md # drivers/adodb-mssqlnative.inc.php
2020-08-02Reset version to avoid merge conflictsDamien Regad56-56/+56
2020-06-28Bump Versionv5.20.18Mark Newnham56-56/+56
2020-05-31Retrieve error messages early before connection close #614Mark Newnham1-0/+6
Error messages from last error are lost if the connection is closed before retrieval
2020-05-31Retrieve error messages early before connection close #614Mark Newnham1-1/+13
Error messages from last error are lost if the connection is closed before retrieval
2020-03-31Bump version to 5.20.17v5.20.17Damien Regad56-56/+56
2020-03-30PHP7.4 throws error at uninitialized array, #608Mark Newnham1-1/+8
method Fields() accessed an unitialized array, that was not trapped in versions of PHP prior to 7.4. method now checks to see if array is initialized.