Home » Database » DB_QueryTool » Bug #954
Can't set primary key with add()
Details
| Submitted | 2004-03-06 04:53 UTC |
|---|---|
| From | ieure at php dot net |
| Assigned | quipo |
| Status | Closed |
| Package | DB_QueryTool |
| PHP Version | Irrelevant |
| OS | Debian 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.