Re: DataObjects: override insert value
| From: | Justin Patrin | Date: | Tue, 08 Jun 2004 00:56:13 +0000 |
| Subject: | Re: DataObjects: override insert value | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-12986@lists.php.net to get a copy of this message | ||
The Linux_kid wrote:
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.Try setting this in your DataObject.ini: dont_use_pear_sequences = true -- paperCrane <Justin Patrin>