RE: [PEAR] Re: DataObjects: override insert value
| From: | ThE LinuX_KiD | Date: | Tue, 08 Jun 2004 01:11:38 +0000 |
| Subject: | RE: [PEAR] Re: DataObjects: override insert value | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12988@lists.php.net to get a copy of this message | ||
Thank you, but doesn't work.
-> Try setting this in your DataObject.ini:
->
-> dont_use_pear_sequences = true
-> > 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.
->