PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_QueryTool » Bug #4128

primary key quoting in update()

Details

Submitted2005-04-12 17:07 UTC
Fromlaurynas dot butkus at gmail dot com
Assignedquipo
StatusDuplicate
PackageDB_QueryTool
PHP VersionIrrelevant
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]);