summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2016-09-20Bump version to 5.20.7v5.20.7Damien Regad56-56/+56
2016-09-20Update changelogDamien Regad56-56/+56
2016-09-14oci8po: prevent segfault on php7Damyon Wiese1-4/+9
The OCIFetchinto function is causing segfaults on php7 - probably because the fields array is not initialised or it is optimised out. This fixes just changes to use the safer function oci_fetch_array instead. Fixes #259 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2016-09-06PDO: fix incorrect quoting allowing SQL injectionDamien Regad1-0/+24
The PDO driver was relying on ADOConnection::qstr() for quoting strings. An application relying on qstr() to manually prepare SQL statements rather than using parameterized queries may be vulnerable to SQL injection attacks, as demonstrated by @jdavidlists. This commit delegates string quoting to PDO::quote() when a connection is available. If not, it simply replaces single quotes by the value of $replaceQuote property. Fixes #226
2016-09-06PDO/mysql: fix MetaTables broken SQLDamien Regad1-1/+1
When a schema is specified in $showSchema, the function generates an invalid where clause: WHERE TABLE_SCHEMA= from myschema ^ should be 'myschema' Fixes #275
2016-09-06PDO MySQL fix for MetaTablesAndy Theuninck1-0/+2
The generated query is broken with the default method arguments. Fixes #275 Signed-off-by: Damien Regad <dregad@mantisbt.org> Original commit changed to use single quotes, added issue reference.
2016-08-31Bump version to 5.20.6v5.20.6Damien Regad56-56/+56
2016-08-10Bump version to 5.20.5v5.20.5Damien Regad56-56/+56
2016-05-25mysqli: fix #240 PHP notice in _close() methodRamūnas Bunokas1-1/+1
2016-05-25PDO: let driver handle SelectDB() and SQLDate() callsAndy Theuninck1-0/+11
Calls to ADODB_pdo::SelectDB() and ADODB_pdo::SQLDate() should be passed through to the underlying $_driver object. If the $database property of the underlying $_driver object isn't initialized correctly, the 1st call to MetaColumns using "schemaName.tableName" as an argument may alter the connection's currently selected database. Fixes #242, related to #40. Signed-off-by: Damien Regad <dregad@mantisbt.org>
2016-05-25Use SQL server native data types if available, see #234Mark Newnham1-4/+14
If the database is Microsoft SQL Server, use the sqlsrv native data types (sqlsrv:decl_type) instead of the PDO native type for improved field type recognition. This fix has been migrated to the pdo_sqlsrv driver in v5.21 (see #245, #247, #245, #250)
2016-05-25Destructor fails if recordset already closedMark Newnham1-1/+1
If the recordset has already been closed, the destructor occasionally fails because the queryId has sometimes been set to -1, not false. See #170, #180
2016-03-31Fix PHP warning in ADORecordset_mysqli::__close()v5.20.4Damien Regad1-1/+1
A warning is triggered when getInsertSql() is passed a string for the tablename: mysqli_free_result() expects parameter 1 to be mysqli_result, integer given Fixes #217
2016-03-30Bump version to 5.20.4Damien Regad56-56/+56
2016-03-30mysqli: cast port number to int when connectingDamien Regad1-1/+2
In PHP7, mysqli_real_connect() expects the port number to be an int; PHP throws a warning if we give it a string, which is usually the case since the port is parsed from a 'hostname:port'. Fixes #218
2016-01-01Bump version to 5.20.3v5.20.3Damien Regad56-56/+56
2016-01-01mssql: fix error when closing RS from destructorDamien Regad2-3/+5
Fixes #180 (this is the correct fix for issue #170).
2015-12-27Bump version to 5.20.2v5.20.2Damien Regad56-56/+56
2015-12-20mssql: avoid error when closing RS from destructorDamien Regad2-4/+9
Fix #170
2015-12-20informix: avoid error when closing RS from destructorDamien Regad1-2/+8
Fixing this is somewhat academic considering that informix driver is no longer supported since PHP 5.2.1 Fixes #170
2015-12-20mysqli: Remove use of '@' operator in RS::_close()Damien Regad1-3/+7
Avoids PHP notice when closing recordset Fixes #170
2015-12-16Better replacement for preg_replace '/e' flagDamien Regad1-4/+15
Instead of creating an anonymous function, modify the existing _colontrack() function to be used as the callback Fixes #168
2015-12-16PHP7 compatibility: remove preg_replace '/e' flagMarina Glancy1-1/+1
This is the original commit contributed by @marinaglancy (dff32013c1f2f1e51ea8be59d447280d60362e33) minus the changes in mysqlt driver (PHP4 constructor), already fixed in a82f3c692df997e2130cec1e5a0c8f77eb5f1ef8. Fixes #168 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-12-16Remove a couple leftover PHP4 constructorsDamien Regad2-10/+0
Follow-up on #139 (commit 9ffa02e6ddc88dbfdfdf4437e0a398cc39960094)A Fixes #168
2015-12-15mysql: MoveNext() apply field names case conversionDamien Regad2-1/+5
Fixes #167
2015-12-06Bump version to 5.20.1v5.20.1Damien Regad56-56/+56
2015-11-28Bump version to 5.20.0v5.20.0Damien Regad56-56/+56
2015-11-26Adjust header comment blocksDamien Regad56-57/+169
- running SED script - manual adjustments for files not processed by regex
2015-11-14If the last action in a script before shutdown was a call to a meta ↵Mark Newnham1-1/+1
function, the query has already been closed
2015-10-25new public method setConnectionParameter fixes ↵Mark Newnham1-0/+4
https://github.com/ADOdb/ADOdb/pull/158
2015-09-14sqlite3 driver: use -1 for _numOfRowsAsheesh Laroia1-1/+0
This relies on the superclass's built-in default of $this->_numOfRows being set to -1. That causes the sqlite3 driver to rely on ADODB_COUNTRECS. Before this patch, we were setting _numOfRows to positive 1, which meant that any query that checked how many rows were available in a queryset would see literally the number 1, which was not accurate for queries that returned 0 rows or queries that returned more rows. In the case of sqlite3, there appears to be no efficient way to ask the PHP sqlite3 driver how many rows come back from a query, so relying on ADODB_COUNTRECS is the best we can do.
2015-08-14Documentation fixes, warn of deprecation and driver removalMark Newnham1-0/+5
reference issue adodb/adodb/issues/117
2015-08-13Documentation fixesMark Newnham1-1/+5
Documentation fix as requested in ADOdb/ADOdb/issues/117
2015-08-13Documentation fixesMark Newnham1-2/+4
Update to documentation as requested in ADOdb/ADOdb/issues/117
2015-08-13Documentation fixesMark Newnham1-1/+5
Documentation update requested in ADOdb/ADOdb/issues/117
2015-08-12postgres: Noblob optimizationmike.benoit1-1/+1
Saves one query for every connection when blobs arent being used. Fixes #112 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-08-11Allow use of prepared statements with driverMark Newnham1-70/+154
Driver failed if a prepared statement was passed to _query(). This was because the _appendN method could only handle an input parameter that was a string . This method now accepts an array as the input parameter
2015-08-11Fix#139: Remove PHP 4 ConstructorsValentin Sheyretski49-276/+151
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
2015-08-11Correct function declarations for strict standards. Fixes #142Andrew Nicols21-39/+39
2015-06-28oci8po: prevent replacement of '?' within stringsMark Newnham1-0/+11
When processing an SQL statement containing a '?' character within a string, ADOdb wrongly assumed it is for a bind variable. The number of variables then no longer matches the number passed, and crashes the _query() function. We now identify whether a '?' is within a string and don't use it as a bind variable if so. Fixes #132 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-06-25MySQL drivers convert field names caseDamien Regad2-0/+2
With this, the mysql and mysqli (and derived) drivers convert the recordset field names to the case defined by ADODB_ASSOC_CASE. Fixes #100
2015-06-25Move _updatefields() method to ADORecordSetDamien Regad2-63/+0
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.
2015-06-25New method ADORecordSet::AssocCaseConvertFunction()Damien Regad1-9/+12
- Avoid code duplication - optimize ADORecordSet_assoc_postgres7::_updatefields()
2015-06-25Coding guidelines and whitespaceDamien Regad3-4/+11
2015-06-25Consistent GetRowAssoc() parameter default valueDamien Regad3-3/+3
MySQL and PostgreSQL used TRUE instead of ADODB_ASSOC_CASE.
2015-06-25Remove useless parameter in GetRowAssoc() callsDamien Regad7-12/+12
Because of the change in default value for the method's parameter, it is no longer needed to specify the constant when calling GetRowAssoc() in the individual drivers.
2015-06-25oci8: driver honors ADODB_ASSOC_CASE when fetching fieldsDamien Regad2-24/+50
This allows use of lowercase field names when executing queries in ADODB_FETCH_ASSOC fetch mode. The _updatefields() method was moved from oci8po to parent oci8 driver. - code was simplified - logic to determine if the operating in associative mode was moved from the callers to the method itself to reduce code duplication. - use of defined ADODB_ASSOC_CASE_* constants Fixes Github #21
2015-06-17PDO: fix broken FetchField functionDamien Regad1-3/+2
Coding guidelines changes actually altered the function's logic by replacing an if/elseif block by a non-equivalent switch statement. Regression introduced by a36f5c4276f7bbf8fc79039a950b0c68d06d2099. Fixes #121, #122
2015-05-21mssqlnative: fix insert_ID() fails if server returns more than 1 rowgitjti1-3/+4
If inserting involves trigger action, SQL server probably returns more than result ”rows” and we are interested in last one only. Fixes #41, PR #102 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-05-21mssqlnative: use correct setting 'WarningsReturnAsErrors'Ray Morris1-2/+2
The driver called sqlsrv_configure('warnings_return_as_errors', 0), which throws "error code = -14, sqlsrv_configure: message = An invalid parameter was passed to sqlsrv_configure". The proper setting is 'WarningsReturnAsErrors', as per documentation http://php.net/manual/en/function.sqlsrv-configure.php Fixes #103 Signed-off-by: Damien Regad <dregad@mantisbt.org> Referenced the fix in the changelog