Re: Can't Get FormBuilder to do an INSERT

From: Date: Wed, 26 Jan 2005 19:38:14 +0000
Subject: Re: Can't Get FormBuilder to do an INSERT
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17182@lists.php.net to get a copy of this message
On Wed, 26 Jan 2005 11:01:23 -0800, Jamie Alessio
I'm having trouble getting DB_DataObject_FormBuilder to generate an INSERT statement when creating new records. It always ends up generating an UPDATE statement like this: ----------------------------------------------- UPDATE expertise SET expertise = 'yeahyeah' WHERE expertise.expertise_id = IS NULL ----------------------------------------------- -- snip --
Are you using release 0.11.0 or later? Are you sure that DB_DataObject set expertise_id to be a key? What happens if you I am using the CVS version 0.11.2 of FormBuilder.
print_r($do->keys()); Array
( [0] => expertise_id )
print_r($do->sequenceKey()); Array
( [0] => expertise_id [1] => 1 [2] => )
print_r($fb->_getPrimaryKey($do)); expertise_id
Does those print_r's give you any ideas? Thanks for taking the time to look into this. - Jamie

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