summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
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 Regad2-25/+79
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 Regad22-40/+53
Update child classes so method signature matches the parent's.
2021-04-11PHPDoc for ADOConnection::$_connectionIDDamien Regad1-1/+2
2021-03-27Improve code style for datadict-postgres.inc.phppeterdd1-97/+92
* proper function cases * remove space between function name and following '(' * fix some indentation where really wrong * add { and } to single instruction ifs to avoid future potential bugs * { on new line for functions * { on same line as if, foreach, or switch statements * add single space between function parameters after , Fixes #691
2021-03-27PHP 8: final private makes no sense, throwing warningEloy Lafuente (stronk7)4-5/+5
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 Regad2-0/+24
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-27Further improve PHPDoc for setConnectionParameter()Damien Regad1-6/+7
2021-03-27Move $connectionParameters declaration and improve PHPDocDamien Regad1-6/+13
The property was defined in the middle of methods, moved it up with other class properties where it belongs. Improved PHPDoc now includes data structure description and explanation.
2021-03-27WhitespaceDamien Regad1-8/+8
2021-03-27xml: Fix invalid SQL in extractSchema()peterdd1-1/+1
This caused an error on PostgreSQL: Query failed: ERROR: argument of WHERE must be type boolean, not type integer Fixes #707 Signed-off-by: Damien Regad <dregad@mantisbt.org>
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 Regad3-64/+58
2021-03-11PHPDoc and camelCase for newDataDictionaryDamien Regad5-6/+14
2021-03-11Remove comment block with SQL statements syntaxDamien Regad1-72/+0
No need to have this in the code, just lookup the documentation.
2021-03-11Fix PHPStorm static analysis warningsDamien Regad2-20/+27
- SQL syntax - unused variables - duplicated code - Whitespace - Variables and return types in PHPDoc
2021-03-11PHPDoc, camelCase for defaultConstraintName()Damien Regad1-5/+12
2021-03-11mssql: use getOne to get default constraintDamien Regad2-11/+6
Simplifies the code, and gets rid of PHP Warnings, both on line 164 in datadict-mssqlnative.inc.php: - Trying to access array offset on value of type bool - Undefined array key "name" Fixes #696
2021-03-10Improve PHPdoc for setConnectionParameter()Damien Regad1-15/+17
Fix whitespace
2021-03-10setConnectionParameter() method should not be finalDamien Regad1-1/+1
This was a mistake, as discussed in [[1]]. Fixes #694 [1]: https://github.com/ADOdb/ADOdb/issues/693#issuecomment-795251586
2021-03-08Bump version to 5.21.1-devDamien Regad135-137/+137
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 Regad3-5/+17
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 Regad4-43/+60
2021-02-27Bump version to 5.21.0v5.21.0Damien Regad135-136/+136
2021-02-27Update ChangelogDamien Regad1-0/+10
2021-02-27updateversion: fix regex to insert new .0 releaseDamien Regad1-2/+3
When processing a .0 release with existing pre-releases, the new section was not inserted in the Changelog.
2021-02-26pgsql: Fix param(0) returning invalid $0 placeholderDamien Regad2-11/+19
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 Regad135-136/+136
2021-02-02Changelog for 5.21.0-rc.1Damien Regad1-2/+31
2021-02-01Changelog: move 5.20.20 in chronological orderDamien Regad1-21/+21
2021-02-01Changelog: Update 5.21.x for keepachangelog formatDamien Regad1-95/+210
2021-02-01updateversion.py script adjustmentsDamien Regad1-7/+7
- use YYYY-MM-DD date format - remove unnecessary escape for `]` - use raw strings for regex - fix typo
2021-01-31Merge branch 'hotfix/5.20' into release/5.21Damien Regad2-174/+432
2021-01-31Reset version to avoid merge conflictsDamien Regad130-131/+131
2021-01-31Bump version to 5.20.20v5.20.20Damien Regad130-131/+131
2021-01-31Update changelogDamien Regad1-0/+22
2021-01-31Adapt updateversion.py for keepachangelog formatDamien Regad1-5/+13
2021-01-31Revise changelog according to "Keep a changelog"Damien Regad1-169/+404
The 5.x changelog (from 5.20.0 and up), now follows the [Keep a changelog](https://keepachangelog.com) format. - Release dates converted to Y-m-d ISO format - Added sections - Added links to GitHub release commits - Added links to GitHub issues
2021-01-25Remove all magic quotes related codeDamien Regad13-294/+206
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 Regad5-7/+33
# Conflicts: # adodb.inc.php
2021-01-25Fix remaining usages of get_magic_* functionsDamien Regad4-6/+32
Follow-up on #657, applies the same logic to remaining usages. This code will be removed in ADOdb 5.21.0. Fixes #619
2021-01-25Remove deprecated XML-RPC Interfacegggeek1-181/+0
It has been unmaintained for ages. Also: - the current version of the phpxmlrpc library [[1]] is now at a new major version, and has a different api - it does not make too much sense to distribute toxmlrpc.inc.php without requiring/distributing phpxmlrpc.inc as well - for those interested in using adodb as part of xmlrpc servers, or even as a full-fledged proxy driver (similar to the built-in rest proxy one) it might be easier to download the phpxmlrpc/extras package, which has been dormant for a while but is getting refreshed these days. I might even externalize the adodb-phpxmlrpc bridge to its own standalone package :-) Fixes #671 [1]: https://github.com/gggeek/phpxmlrpc
2021-01-24pgsql: add override for ChangeTableSQL()jmruiz841-0/+44
Inheritance from ADODB DataDict does not work. This new function has been verified in PostgreSQL 12.2 Fixes #634
2021-01-24text: fix Cannot pass parameter by reference (#668)peterdd1-1/+1
2021-01-24Fix phpdoc for extractSchema() (#662)peterdd1-5/+5
2021-01-24Merge branch 'hotfix/5.20' into release/5.21Damien Regad4-10/+22
# Conflicts: # adodb-xmlschema03.inc.php # adodb.inc.php # drivers/adodb-pdo.inc.php
2021-01-24Fix get_magic* for xmlschema for PHP5.3-PHP8 (#657)peterdd2-4/+6
for 5.20.* branch, PHP7.4 shows deprecation notice, so the function_exists() is not enough.
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)