| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
Avoids PHP Fatal error: Cannot call constructor in postgres driver.
Fixes #172
|
|
|
|
|
|
In the past, ADOdb versions were numbered X.YY, and hot fixes were
identified by an optional letter suffix, e.g. 5.17, 5.18a. Starting with
5.20, we switched to Semantic Versioning.
The regex in ADOConnection::Version() was not adjusted to reflect this,
and the function incorrectly returns '5.20' instead of '5.20.0'.
The code now correctly handles SemVer version numbers, and also allows
the following pre-production suffixes: dev, alpha, beta, rc; the last 3
must be followed by an additional version number (e.g. 5.21.0-beta.1).
In case the ADOdb version string (defined in $ADODB_vers global) does
not match the regex, the function outputs a warning and falls back to
returning a substring starting with 1st character (excluding leading 'v'
if present), until the first whitespace or the end of the string).
Fixes #164
|
|
Regression introduced in v5.20.0.
Commit 32a479a182c86f4b15c337ca6b1d3f4b967e37a8 removed the is_array()
check, resulting in a PHP warning when calling array_keys() on an empty
recordset, since $this->fields is false in this case.
Fixes #162
|
|
|
|
|
|
- running SED script
- manual adjustments for files not processed by regex
|
|
https://github.com/ADOdb/ADOdb/pull/158
|
|
Fixes #143
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
When executing a query that does not expect any parameters with a
non-empty input array, the parameters are added at the end of the
query.
Example:
- $db->Execute('select * from table where id=', 1);
expected: failure (extra param, invalid query)
actual: execution of 'select * from table where id=1'
- $db->Execute('select * from table where id=1', 1);
expected: failure (extra param)
actual: execution of 'select * from table where id=11'
This has been confirmed to occur using mysqli driver, but could possibly
affect others drivers with _bindInputArray = false as well.
Execute() now issues an error when the number of provided input
parameters does not match what the query expects.
Thanks to peterdd for the initial research and proposed fix.
Fixes #146
|
|
|
|
Prior to this every driver needed to define their own SetCharSet method,
because the original method just returned FALSE.
The charset is now set in the base class method.
This commit squashes the 2 patches provided in PR #39.
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
This line was inadvertantly removed in commit
016dea3c70a7e2bd146907213f050931a8fbf684
This would most likely not have had any impact on recent version of
ADOdb, since the extension has not been supported for many years.
|
|
This is the original commit from @valioz, rebased on latest master
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Conflicts:
drivers/adodb-db2ora.inc.php
drivers/adodb-mssqlpo.inc.php
drivers/adodb-odbc_oracle.inc.php
|
|
Commit 41839f5c18abe262ee088f1d4bd92453616d2a4a (fix for #88) introduced
a regression, causing error in some cases, for example "oci_execute()
expects parameter 1 to be resource, string given".
This resolves the problem by only attempting str_replace() on strings
rather than arrays.
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Original patch was modified to wrap long comments and improve commit
message.
|
|
Commit 9d47b60bc746076bef8453a99b8d0ee97b5999ac limited case conversion
to when the recordset was in associative fetch mode; this introduced a
regression, causing the unit tests to fail.
We now convert the case systematically (i.e. also when fetch mode is
ADODB_FETCH_NUM).
|
|
Currently, this method only exists in postgres7, oci8 and derived
drivers. Moving it to the base class will enable reuse by other drivers
that need the functionality.
|
|
- Avoid code duplication
- optimize ADORecordSet_assoc_postgres7::_updatefields()
|
|
|
|
GetRowAssoc() and GetAssocKeys() parameter now defaults to
ADODB_ASSOC_CASE instead of ADODB_ASSOC_CASE_UPPER, which ensures we're
able to properly bind data when using lowercase field names.
Adjusts the test case accordingly.
Fixes #98
|
|
Fixes #20
|
|
|
|
When buidling the bind array in GetAssocKeys(), we now use the
ADORecordSet's fetchMode property to determine the case conversion
function to use (if any), and only apply it when necessary.
|
|
The constant is set to ADODB_ASSOC_CASE_NATIVE within
ADONewConnection(), if it is not previously defined.
|
|
|
|
Commit 52a1d8f473d90ec7f46d27a9b0439478e74659a9 introduced a regression.
The fix did not properly consider that the purpose of the isset tests
was to determine whether the recordset's fields was a numerically
0-based indexed array.
As a consequence, when calling GetAssoc() in ADODB_FETCH_ASSOC mode with
data like array('adodb', '0'), $numIndex was incorrectly set to True,
leading to an 'Undefined offset' PHP notice and wrong return value
array(0=>null) instead of array('adodb'=>'0').
Fixes #101
|
|
Update comments in the code as well as the documentation to describe
ADODB_FETCH_* and ADODB_ASSOC_CASE_ constants.
Added description of each case and usage hints.
|
|
They were previously defined in adodb-pear.inc.php, which doesn't make
much sense since they are only referenced within adodb.inc.php.
Fixes #49
|
|
No point in cluttering global workspace with a variable that is not used
anywhere after initial setup.
|
|
Fixes #57
|
|
Adds the mssql datatype datetime2 to the metatype mapping. Prevents
date time errors caused by the field being treated as a long.
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
- ADOConnection::Connect
- ADOConnection::PConnect
Fixes #63
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
There are cases where ADODB is not be able to figure out the proper
count(*) queries for PageExecute() on its own.
To work around this problem, ADOdb now handles a new keyword
"_ADODB_COUNT" that can be wrapped around the parts of the SQL query
that should be replaced with "COUNT(*)"; the code will remove everything
between and including the _ADODB_COUNT keywords and replace it with
COUNT(*). The _ADODB_COUNT tags are of course removed when COUNT(*) is
not needed.
Example usage:
SELECT
_ADODB_COUNT
col1,
col2,
col3,
( select col4 from table2 where col1=col2 )
col4,
_ADODB_COUNT
FROM table1
LEFT JOIN ( select col5 from table3 where col3=col4 ) AS tmp;
Original 2012 bug report: http://phplens.com/lens/lensforum/msgs.php?id=19058
The fix has been in use since that time in hundreds of thousands of
production installations.
Fixes #88
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
Signed-off-by: Damien Regad <dregad@mantisbt.org>
Mike's original commit was split into distinct elements.
|
|
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
|
|
|
|
|
|
|
|
Added methods to ADORecordSet_empty to improve compatability with other
ADORecordSet_* types.
resolves #43, PR #45
Signed-off-by: Damien Regad <dregad@mantisbt.org>
|
|
Fixes #24
|
|
Fixes #32
|
|
There was a small mistake in the version matching regex introduced in
commit 30c21280a48680c079f825af6583793928d65cf5, causing the function to
trigger a system notice and only return 'V' instead of the actual
version number.
Fixes #16
|
|
|
|
|
|
Fixes #13
|
|
|