View Issue Details

IDProjectCategoryView StatusLast Update
0002371OXID eShop (all versions)1. ----- eShop frontend -----public2012-12-10 14:37
Reportercsimon Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionwon't fix 
Summary0002371: oxDB::getDB(true) doesn't work in some cases
DescriptionThis maybe a known bug, but i report it anyway.

If you get an oxdb instance with "getDb(true)" sometimes other functions change the fetch mode from adodb to numeric, instead of the prior selected associative.
Steps To Reproduce$db = oxDB::getDb(true);

$value = $someObject->someFunction(); // this should be a function where "getDb" is used with "false" or nothing as first argument

$result = $db->Execute('select something from somewhere where id = ' . $value);

The result will be numeric, instead of associative.
Additional InformationThis is caused by the adodb implementation, where the fetch mode is used as "global" variable and is reset by any function call where getDb is used.
TagsNo tags attached.
Theme
Browser
PHP Version
Database Version

Activities

csimon

2011-01-09 11:29

reporter   ~0003950

sorry forgot to check the shop version, this is of course not EE only.

dominik_ziegler

2011-01-11 10:15

reporter   ~0003956

Had this problem too but was unable to find a way to reproduce it.

sarunas_valaskevicius

2011-01-28 14:56

reporter   ~0004025

since adodblite uses only this global variable for setting mode, and getDb() returns adoDbLite connection, eShop code itself cannot nicely override query functions without major reworking or a wrapper class.

Also, it is worth to mention, that usage of non-associative mode is discouraged and left only for the smoother transition to associative mode usage.