View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005166 | OXID eShop (all versions) | 4.07. Source code, Test | public | 2013-06-13 11:32 | 2013-06-14 14:42 |
Reporter | settermjd | Assigned To | |||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | unable to reproduce | ||
Summary | 0005166: Issue using oxUtilsObject::getInstance()->generateUId() in a foreach loop | ||||
Description | I have the following code, which I expect to continue to generate unique identifiers for use in the query. However, on the 5th iteration, the number returned is always the same as on the first iteration. It results in the following MySQL error: - mysql error: [1062: Duplicate entry... Is this a known bug? Alternatively, is there something that I'm doing wrong, which causes this error to occur? foreach ($categories as $category) { $sql = sprintf($sQuery, $this->_db->quote(oxUtilsObject::getInstance()->generateUId()), $this->_db->quote($articleId), $this->_db->quote(trim($category)) ); $rs = $this->_db->Execute($sql); } | ||||
Steps To Reproduce | Just calling the code is enough to reproduce the error. | ||||
Additional Information | The version of Oxid is: Enterprise Edition 5.0.3_54408 The operating system is Gentoo Linux. | ||||
Tags | No tags attached. | ||||
Theme | Both | ||||
Browser | All | ||||
PHP Version | 5.3 | ||||
Database Version | 5.1 | ||||
|
This is a non-issue. Please disregard. |
|
Reminder sent to: settermjd Hi, Could you post a sql query? Because we cannot reproduce this issue. Maybe do you use the same article ID ? Best regards, |