Home » Database » DB_QueryTool » Bug #4128
primary key quoting in update()
Details
| Submitted | 2005-04-12 17:07 UTC |
|---|---|
| From | laurynas dot butkus at gmail dot com |
| Assigned | quipo |
| Status | Duplicate |
| Package | DB_QueryTool |
| PHP Version | Irrelevant |
| Roadmaps | (Not assigned) |
Comments
[2005-04-12 17:07 UTC] laurynas dot butkus at gmail dot com
Description:
------------
DB_QueryTool_Query::update should quote primary key value, because it might be a string.
Reproduce code:
---------------
simple fix:
if (isset($newData[$this->primaryCol])) {
$query['where'] = $this->primaryCol.'='.$this->db->quoteSmart($newData[$this->primaryCol]);