summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-01-17Improve autoExecute() PHPDoc, fix $where param typeDamien Regad1-18/+16
$where was wrongly typed as bool. Changed it to string and updated the default value from false to ''. Fixes #915
2023-01-16Use IF NOT EXISTS when adding a new column Ioannis Igoumenos1-1/+2
Executing a schema update that adds a column more than once will generate a column already exists error. This prevents the error by appending `IF NOT EXISTS` to the generated SQL on PostgreSQL 9.6 or later. Fixes #897 Signed-off-by: Damien Regad <dregad@mantisbt.org> Reworded commit message
2022-11-23Bump version to 5.22.5-devDamien Regad2-1/+10
2022-11-23ADODB_FETCH_DEFAULT should be treated as ASSOCMark Newnham1-3/+1
Ensures that the recordset is returned in the default provided by the PHP driver as per the documentation. Fixes #886
2022-10-28Bump version to 5.22.4v5.22.4Damien Regad2-2/+2
2022-10-28Update ChangelogDamien Regad1-0/+4
2022-10-28mysqli: store error msg/code after query executionDamien Regad1-8/+20
ADOConnection's errorNo() and errorMsg() methods were returning 0 / '' when executing an SQL statement with bound parameters, since the introduction of true prepared statements (in #655). This is because they are getting error information from the mysqli connection object, but when using prepared statements, it must be retrieved from the mysqli_stmt object. Fixes #872
2022-10-28Ignore .DS_Store filesDamien Regad1-0/+1
2022-10-28affected_rows() returns false when called incorrectlyMark Newnham1-3/+5
If called incorrectly, the affected_rows() method now returns false instead of returning an error from the SQL server driver. Fixes #895
2022-09-09Update ChangelogDamien Regad1-0/+4
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-09Add PHPUnit cache files to .gitignoreDamien Regad1-0/+4
2022-09-09Test case for adodb_strip_order_by()Damien Regad1-0/+45
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-08Fix mysqli_result could not be converted to intDamien Regad2-3/+7
Partial revert of 721c31492ac77aa1bd9bdd01193cd6071087b49f. This was an early attempt to fix #848; the actual fix was implemented in the PostgreSQL driver, but the change to ADORecordSet::__destruct() was not reverted. Fixes #867
2022-09-08Bump version to 5.22.4-devDamien Regad2-1/+4
2022-09-07Update ChangelogDamien Regad1-0/+1
https://github.com/ADOdb/ADOdb/issues/124#issuecomment-1238798400
2022-09-06Bump version to 5.22.3v5.22.3Damien Regad2-3/+3
2022-09-06Update ChangelogDamien Regad1-0/+3
2022-09-06Call driver-specific column change methods in alterTableSql()Mark Newnham1-34/+17
alterTableSql() uses core methods instead of driver-specific ones. Change method used to create SQL statements. Fixes #865, #383 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2022-09-04Update ChangelogDamien Regad1-0/+6
2022-09-03Fix uncaught TypeErrorDamien Regad2-0/+13
On PHP 8.x, executing an update query with the Firebird or Interbase driver results in a Fatal error: Uncaught TypeError: ibase_num_fields(): Argument #1 ($query_result) must be of type resource, int given. Problem is caused by fbird_query() / ibase_query() returning the number of affected rows instead when executing INSERT, UPDATE and DELETE statements, but ADOConnection::_Execute() expects true. This was already triggering a warning in earlier PHP versions, but it was silenced by the @ operator. Fixes #858
2022-09-03Fix str_repeat() error in _adodb_backtrace() Damien Regad3-84/+164
ValueError: str_repeat(): Argument #2 ($times) must be greater than or equal to 0 on adodb/adodb-lib.inc.php:1255 Merge PR #856, fixes #852
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 Regad2-5/+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-09-03Remove uneeded call to ADOconnection::out for debuggingMark Newnham1-7/+0
2022-09-03WhitespaceDamien Regad1-10/+9
2022-09-03oci8po: Replace deprecated functions aliasesDamien Regad1-6/+5
Fixes #862
2022-08-26Update ChangelogDamien Regad1-0/+4
2022-08-26Whitespace, coding guidelinesDamien Regad1-74/+82
2022-08-26pgsql: check for dummy query Id before closing recordsetDamien Regad1-1/+1
Fixes #848
2022-08-26New class constant ADORecordSet::DUMMY_QUERY_IDDamien Regad3-5/+15
Replace hardcoded '-1' value when creating dummy RecordSets. Issue #848
2022-08-26mssql: insert_id returns false if value is out of rangeMark Newnham1-1/+1
Insert_id() attempts to force the return value to an integer data type which fails if the value is out of range. Fixes #853
2022-07-23Update ChangelogDamien Regad1-0/+6
2022-07-23Fix errorMsg() / errorNo() on MySQL 8Damien Regad1-8/+11
Merge PR https://github.com/ADOdb/ADOdb/pull/843
2022-07-23Apply the same fix to errorNo()Damien Regad1-4/+6
2022-07-23Fix PHP Warning when connection is already closedDamien Regad1-6/+5
If errorMsg() is called after closing the MySQL connection (with mysqli_close()), the method will throw a PHP warning: Uncaught Error: mysqli object is already closed. With PHP < 8.0 the warning won't be thrown due to the @ operator, but the function will return false; with PHP 8.0 or later, this is a fatal error (exception). Remove unnecessary @ operator. Fixes #842
2022-07-23Fix errorMsg() when no connection on MySQL 8Mark Newnham1-1/+3
MySQL 8 returns an object even if the client connection fails. This causes ADOConnection_mysqli::errorMsg(), which expects the connection object to be empty if there is no connection, to throw an error. Fixes #842
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