summaryrefslogtreecommitdiff
path: root/adodb-lib.inc.php
AgeCommit message (Collapse)AuthorFilesLines
2025-10-25PHP 8.5: fix Non-canonical cast deprecationsDamien Regad1-1/+1
Non-canonical cast (integer) is deprecated, use the (int) cast instead Global search and replace throughout the code base. Fixes #1143
2024-12-15Fix PHP deprecation warningDamien Regad1-1/+1
strcasecmp(): Passing null to parameter of type string is deprecated in adodb-lib.inc.php on line 369 Fixes #1054
2024-08-25PHPDocDamien Regad1-12/+17
2024-01-10 _adodb_backtrace() output with outp() instead of printDamien Regad1-1/+1
Fixes #1018
2023-04-15Remove invalid _maxRecordCount assignmentDamien Regad1-1/+0
$_maxRecordCount does not make sense in ADOConnection context, it is a property of ADORecordSet. The value is already and correctly set before returning the RecordSet at the end of _adodb_pageexecute_all_rows(). Fixes #954
2023-04-15PHPDocDamien Regad1-17/+42
2022-09-09Don't strip ORDER BY clause from subqueriesDamien Regad1-3/+7
adodb_strip_order_by() should only remove the ORDER BY clause from the outer SELECT statement, not from subqueries. Fixes #870
2022-09-09Refactor adodb_strip_order_by()Damien Regad1-25/+13
The replacement of preg_match() by preg_match_all() in commit 8eaf842d19e4206e1c44e0eda44688ebfa1728ed basically made most of the code in the function useless (the block parsing the SQL statement for paretheses was never called). Also, the logic to retrieve the last ORDER BY clause was a bit contrived. Fixes #869
2022-09-03Do not display error if $errno == 0Damien Regad1-1/+4
2022-09-03Fix over-indented trace when $elementsToIgnore > 0Damien Regad1-0/+1
2022-09-03Fix backtrace printed twice in debug mode 99Damien Regad1-2/+2
See https://github.com/ADOdb/ADOdb/pull/856#discussion_r953591183
2022-09-03Fix display of trailing `-` for non-PDO driversDamien Regad1-1/+1
2022-09-03PHPDocDamien Regad1-11/+12
2022-09-03Whitespace, coding guidelinesDamien Regad1-165/+120
2022-09-03Mismatched sprintf argumentsMark Newnham1-3/+3
2022-09-03preg_replace process line characters, remove str_replaceMark Newnham1-16/+3
2022-09-03Prevent str_repeat error in adodb_backtrace see #852Mark Newnham1-44/+187
This fix eliminates the error in str_repeat when the number of repeats hits zero In addition, the function is refactored with improved variable names and docblocks
2022-08-26New class constant ADORecordSet::DUMMY_QUERY_IDDamien Regad1-1/+1
Replace hardcoded '-1' value when creating dummy RecordSets. Issue #848
2022-07-23Whitespace, Coding guidelinesDamien Regad1-123/+120
2022-07-23Fix undefined variable warningDamien Regad1-0/+3
2022-07-23Replace foreach by str_reapeatDamien Regad1-1/+1
2022-07-23Remove unnecessary reference on function parameterDamien Regad1-12/+12
2022-07-23Remove unused / commented-out codeDamien Regad1-49/+0
2022-07-23Remove unused variable / unnecessary assignmentDamien Regad1-9/+2
2022-06-29Fix GetUpdateSQL() causing deprecated warningDamien Regad1-1/+1
PHP 8.1 throws a warning when compared field value is null. Fixed by replacing strcmp() with a strict-comparison operator. Fixes #844
2021-08-17Redo Merge tag 'v5.21.1'Damien Regad1-32/+43
# Conflicts: # adodb.inc.php # docs/changelog.md # drivers/adodb-mssqlnative.inc.php # drivers/adodb-mysqli.inc.php Fixes #751
2021-08-17Redo Merge branch 'hotfix/5.21' Standardized file headersDamien Regad1-12/+22
Try to do it right this time... # Conflicts: # adodb-memcache.lib.inc.php Fixes #751
2021-08-17Revert changes since Standardized file headers mergeDamien Regad1-65/+44
The conflicts resolution applied when merging the Standardized file headers (commit e9dcce3df24912ad869d0193f0b419f2309101fc) was seriously messed up, actually overwriting a number of changes in the master branch. Rather than trying to go and fix things one by one which has a high risk of messing things further, it's easier to redo the merge from a clean slate, so this commit reverts the following: - "Merge branch 'hotfix/5.21' Standardized file headers", e9dcce3df24912ad869d0193f0b419f2309101fc - "Merge tag 'v5.21.1'", 5f437df3104159d5d659f60e31bef8d33c34995f - "Reset version to 5.22.0-dev" af9234a525c3255af051a330164486d73be4c63a - "Fix incorrect resolution of merge conflicts" a6733f61b0165b366c8d2c70d9af82edc3881951. - "Fix syntax error in toexport.inc.php" 20b01e83cb61b6b2460f64c7d1277c5f4cc28574. Fixes #751
2021-08-15New _adodb_quote_fieldname() functionDamien Regad1-32/+43
Removes duplicated code in _adodb_getupdatesql(), _adodb_getinsertsql(). Fixes #721 (incorrect handling of $ADODB_QUOTE_FIELDNAMES = `true`, which was treated as 'BRACKETS' since 5.21.0, see #246).
2021-08-14Standard file header: /Damien Regad1-12/+22
2021-07-10subselects in postgres requires aliasing see #736Mark Newnham1-1/+1
2021-07-07array to string conversion in adodb_debug_execute, see #737Mark Newnham1-1/+9
2021-04-23Remove subqueries without using regexDamien Regad1-5/+25
Following discussion in #718, using regex to identify and remove sub-queries in _adodb_getcount() is flawed and can't be fixed. This led to implementing a hack using _ADODB_COUNT "keyword" to (see #88 41839f5c18abe262ee088f1d4bd92453616d2a4a). This replaces the regex parsing by a simple loop on the query string, removing everything between the SELECT and the FROM clause, ignoring whatever is between parentheses (i.e. subqueries). The _ADODB_COUNT logic is therefore obsolete Fixes #715
2021-04-23Whitespace, coding guidelinesDamien Regad1-15/+27
2021-04-23Restructure pageexecute() function and add support for PDO driverMark Newnham1-11/+12
- Refactor the driver matching code to make it easier to add. - Add support for PDO/mysql driver
2021-03-08Bump version to 5.21.1-devDamien Regad1-1/+1
2021-02-27Bump version to 5.21.0v5.21.0Damien Regad1-1/+1
2021-02-02Bump version to 5.21.0-rc.1v5.21.0-rc.1Damien Regad1-1/+1
2021-01-25Remove all magic quotes related codeDamien Regad1-18/+15
The $magic_quote parameter for public methods was kept for backwards compatibility purposes, but is no longer used. Fixes #674
2020-12-20Bump version to 5.21.0-beta.1v5.21.0-beta.1Damien Regad1-1/+1
2020-12-06Removed references to phplens.com, see #564Mark Newnham1-2/+2
2020-01-08fix #572, also quote fieldnames when value set null, fix indentations (#585)peterdd1-122/+124
* quote fieldnames in _adodb_getupdatesql, fix indentations * Fix my own conflict edits Co-authored-by: Mark Newnham <mark@newnhams.com>
2020-01-05Replace call to _array_change_key_case see #587Mark Newnham1-16/+4
2020-01-04function makes needless PHP4 version Check, see #583Mark Newnham1-3/+3
2019-12-30Support for T-SQL-styled square BracketsMarat1-0/+4
Microsoft wraps column names in square brackets in T-SQL statements, which is not really obligatory but becomes necessary when reserved keywords are used as columns names (e.g. 'BEGIN' or 'CURRENT'). Fixes #246 Signed-off-by: Damien Regad <dregad@mantisbt.org> Original commits from PR squashed and message reworded.
2019-11-28adodb_strip_order_by() strips incorrectly if there are multiple order by ↵Mark Newnham1-1/+7
statements #549 If the SQL statement passed to adodb_strip_order contains multiple order by statements, the incorrect one is stripped. This change ensures that only the last one is stripped Co-Authored-By: mustafa-soner-acar <mustafa-soner-acar@users.noreply.github.com>
2019-11-24Merge branch 'hotfix/5.20'Damien Regad1-120/+116
# Conflicts: # adodb-lib.inc.php
2019-11-24Reduce code duplication in _adodb_getmenu functionsDamien Regad1-81/+80
Create 2 new internal functions - _adodb_getmenu_select() to print the SELECT tag, and - _adodb_getmenu_option() to print the OPTION tags and call them from _adodb_getmenu() / _adodb_getmenu_gp().
2019-11-24Code cleanup for _adodb_getmenu()/_adodb_getmenu_gp()Damien Regad1-71/+69
- Whitespace - Coding guidelines - Remove unused variables - Remove empty if statements - Optimization
2019-11-24Fix getMenu() for ADODB_FETCH_BOTHDamien Regad1-15/+21
Commit 61c5a8cf0ea9df2777eed7d1bb7935593aa93545 (see #460) introduced a regression in the behavior of getMenu() when ADODB_FETCH_MODE is set to ADODB_FETCH_BOTH, causing it to use the recordset's first column for both the select options' value and description. Fixes #482