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 #3902

package is not ready to work with primaryCol not int

Details

Submitted2005-03-21 16:36 UTC
Frommarcin dot krzyzanowski at gmail dot com
Assignedquipo
StatusClosed
PackageDB_QueryTool
PHP Version5.0.2
OSMacOS
Roadmaps(Not assigned)

Comments

[2005-03-21 16:36 UTC] marcin dot krzyzanowski at gmail dot com

Description:
------------
DB_QueryTool is not ready to work with $primaryCol other
than "INT" because of brackets.

Reproduce code:
---------------
$primaryCol = "username";
.......

$data = array(
'username' => "'aaa'",
'password' => "bbb"
);
$authTable->update($data);

Expected result:
----------------
SELECT auth.username AS "username",auth.password AS
"password" FROM auth WHERE auth.username='aaa'
UPDATE auth SET
username='aaa',password='bbb)' WHERE
username='aaa'

similar with ->add then it produce "WHERE username=aaa"
instead "WHERE username='aaa'"

Actual result:
--------------
SELECT auth.username AS "username",auth.password AS
"password" FROM auth WHERE auth.username='aaa'
UPDATE auth SET
username='\'aaa\'',password='bbb)' WHERE
username='aaa'