FW: [PEAR] dataobject : problem with insert function

From: Date: Mon, 23 Aug 2004 08:14:46 +0000
Subject: FW: [PEAR] dataobject : problem with insert function
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-14231@lists.php.net to get a copy of this message
> -----Original Message----- > From: Denis Gerasimov [mailto:denis.gerasimov@vekos.ru] > Sent: Monday, August 23, 2004 12:02 PM > To: 'mike' > Subject: RE: [PEAR] dataobject : problem with insert function > > > Hello, > > Is this a primary key for your table? > > If so, you may call $this->keys(null) to reset primary keys of the table. > Then insertion will go fine. > But don't forget to restore them if you need them later in you code. For > example: > > $keys = $this->keys(); > $this->keys(null); > > // performing insertion here... > > $this->keys($keys); > > Best regards, Denis Gerasimov > Outsourcing Services Manager, > VEKOS, Ltd. > www.vekos.ru > > -----Original Message----- > From: mike [mailto:laurent.ludovic@free.fr] > Sent: Monday, August 23, 2004 11:45 AM > To: pear-general@lists.php.net > Subject: [PEAR] dataobject : problem with insert function > > Hi, > > I would like redefine insert function because I need to set the key value. > But Dataobject ignore the value that I give it. > Here's the function : > > function insert(){ > > DB_DataObject::DebugLevel(1); > > $this->rubcode=81; > > > parent::insert(); > > > } > > > > Normally, I should have 81 for the insert value, really, I have the value > 9, > dataobject does not take into account my value. What have I to do? > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.general (#14231) next »