summaryrefslogtreecommitdiff
path: root/adodb.inc.php
AgeCommit message (Collapse)AuthorFilesLines
2015-05-15Fix incorrect behavior for GetAssoc()Damien Regad1-1/+4
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
2015-05-04Improve documentation of fetch mode and assoc caseDamien Regad1-12/+29
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.
2015-04-20Define DB_AUTOQUERY_* constants in main includeDamien Regad1-0/+8
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
2015-04-20Unset global variable after useDamien Regad1-1/+3
No point in cluttering global workspace with a variable that is not used anywhere after initial setup.
2015-04-20When flushing cache, initialize it if it is not setDamien Regad1-1/+2
Fixes #57
2015-04-20mssql datetime2 metatype mappingMarcelTO1-0/+1
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>
2015-04-20Parse port out of hostname if specified when connectingAndy Theuninck1-0/+6
- ADOConnection::Connect - ADOConnection::PConnect Fixes #63 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2015-04-20Add support for pagination with complex queriesMike Benoit1-0/+5
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>
2015-04-20Move() method returns false if given row is < 0Mike Benoit1-0/+5
Signed-off-by: Damien Regad <dregad@mantisbt.org> Mike's original commit was split into distinct elements.
2015-03-04Fixed Including of memcache library only once for PHPUnit 4.xAlan Farquharson1-1/+1
Signed-off-by: Damien Regad <dregad@mantisbt.org>
2014-10-01Fix syntax errorDamien Regad1-2/+0
2014-09-26Coding guidelines / whitespaceDamien Regad1-1025/+1308
2014-09-26Coding guidelinesDamien Regad1-34/+35
2014-09-26Replace useless variable $false by falseDamien Regad1-47/+41
2014-09-26Improve compatability of ADORecordSet_emptySjan Evardsson1-0/+8
Added methods to ADORecordSet_empty to improve compatability with other ADORecordSet_* types. resolves #43, PR #45 Signed-off-by: Damien Regad <dregad@mantisbt.org>
2014-08-07Remove undefined variable referenceDamien Regad1-2/+2
Fixes #24
2014-08-07Convert files from ISO-8859-1 encoding to UTF-8Damien Regad1-5/+5
Fixes #32
2014-05-12Fix version match regexDamien Regad1-1/+1
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
2014-05-07WhitespaceDamien Regad1-13/+13
2014-05-07Use constants in switch statementDamien Regad1-3/+3
2014-05-07AutoExecute does not respect empty ResultSet in case of UpdateDamien Regad1-3/+6
Fixes #13
2014-05-07Simplify code to determine AutoExecute's return valueDamien Regad1-4/+1
2014-05-07Remove useless $false variableDamien Regad1-6/+5
2014-04-30Bump version to 5.20devDamien Regad1-2/+2
2014-04-23Bump version to 5.19v5.19Damien Regad1-2/+2
2014-04-20Fix outdated references to readme.htmDamien Regad1-1/+1
2014-04-16Change default postgres driver from 7 to 8Damien Regad1-1/+1
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/
2014-04-16Define postgres8 driver classDamien Regad1-1/+0
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.
2014-04-16Reformat switch statement for better readabilityDamien Regad1-2/+9
2014-04-16ADOConnection is now an abstract classDamien Regad1-10/+1
2014-04-16Whitespace and commentsDamien Regad1-152/+150
2014-04-15Fix version match regex to include suffixDamien Regad1-1/+1
The old regex in ADOConnection::Version only included the numeric part of the ADOdb version number. Now the suffix (dev|[1-z]) is also returned. The regex in updateversion.py has been updated to match.
2014-03-04GetAssoc issue when 2nd column is nullDamien Regad1-1/+1
If the second column of the first row happens to be null, ADOdb returned a one-based array rather than the expected zero-based one. Resolved by using array_key_exists() instead of isset(). Fixes sourceforge bug #130
2014-03-04Fix Execute() ignoring param evaluating to falseDamien Regad1-1/+1
When ADOConnection->Execute is called with a single non-array parameter that evaluates to false, it ignores the parameter. Fixed by doing a strict-type comparison. Note that single boolean "false" parameter needs to be passed in as array(false). Reported by Alejandro Vásquez Fixes sourceforge patch #32
2014-02-24PHPdoc for ADOConnection->Param()Damien Regad1-9/+13
2014-02-24Remove closing php tagDamien Regad1-1/+0
http://php.net/manual/en/language.basic-syntax.phptags.php
2014-01-21Bump version to 5.19devDamien Regad1-2/+2
Bumped 'dev' version allows users who rely on source code downloaded from the git repository rather than an official release tarball to reliably determine that they are running a development version of the library.
2013-08-11GetRowAssoc: Fix phpDocDamien Regad1-5/+3
2013-08-11GetRowAssoc: Use array_key_exists() instead of isset()Damien Regad1-3/+4
As suggested by user 'Harmony' in [1]. This fixes erroneous behavior when using ADODB_FETCH_ASSOC fetch mode and a field's value is null, in which case it was not included in the result set. [1] http://phplens.com/lens/lensforum/msgs.php?id=17539
2013-08-05Reorg: ADOdb5 (master) branchDamien Regad1-0/+4503
- Move all files in adodb5/ to root - Remove adodb-for-php4/ directory