| Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
- 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
|
|
|
|
|
|
|
|
|
|
|
|
When using 'pgsql' or 'postgres', ADOdb now sets the class to postgres8
instead of postgres7.
This is justified by PostgreSQL's versioning policy [1], as all 7.x
releases are end-of-life since 2010 or before. 8.4 is still supported
until July 2014.
[1] http://www.postgresql.org/support/versioning/
|
|
The _insertid() method introduced in postgres9 driver really belongs in
postgres8, since OID field was actually removed in 8.1.
This commit creates new postgres8 classes, moves the method from the '9'
driver to the new ADODB_postgres8 class, and makes the '9' classes
inherit from postgres8 instead of postgres7.
|
|
|