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

Can't set primary key with add()

Details

Submitted2004-03-06 04:53 UTC
Fromieure at php dot net
Assignedquipo
StatusClosed
PackageDB_QueryTool
PHP VersionIrrelevant
OSDebian GNU/Linux
Roadmaps(Not assigned)

Comments

[2004-03-06 04:53 UTC] ieure at php dot net

Description:
------------
Calling add() unsets any primary key in the row passed to it. This is
bad because it prevents one from, e.g. importing a 3rd-party
database.

Reproduce code:
---------------
$data = array(
'id' => 42,
'name' => 'the answer'
)
$table->add($data);

Expected result:
----------------
A record with an id of '42' should be created.

Actual result:
--------------
A record with the next available id is created.