View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002371 | OXID eShop (all versions) | 1. ----- eShop frontend ----- | public | 2011-01-09 11:29 | 2012-12-10 14:37 |
Reporter | csimon | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | resolved | Resolution | won't fix | ||
Summary | 0002371: oxDB::getDB(true) doesn't work in some cases | ||||
Description | This 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 Information | This 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. | ||||
Tags | No tags attached. | ||||
Theme | |||||
Browser | |||||
PHP Version | |||||
Database Version | |||||
|
sorry forgot to check the shop version, this is of course not EE only. |
|
Had this problem too but was unable to find a way to reproduce it. |
|
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. |