DataObjects: override insert value
| From: | ThE LinuX_KiD | Date: | Mon, 07 Jun 2004 23:16:06 +0000 |
| Subject: | DataObjects: override insert value | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-12984@lists.php.net to get a copy of this message | ||
Hi
I've last DB and DataObjects version,
and I've a table with Key field as "autonumeric".
example:
Table foo
--------
id --> KeyValue (autonumeric)
name --> string
model --> string
...
Everything is right, but sometimes, I need
to set a specific value to "Field bar1",
then, if I prepare:
$foo=new DataObejcts:foo();
$foo->id="16";
$foo->name="toyota"
$foo->insert();
BUT, last insert doesn't put me a $id="16" on DataBase.
how ever, if I make a pure MySQL query, it accept
my id="16" succefully
how can I make this with DataObjects?
Thanks !
andres.