Re: DB_Dataobject Insert Problem with getting id

From: Date: Mon, 24 Oct 2005 16:27:27 +0000
Subject: Re: DB_Dataobject Insert Problem with getting id
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-21614@lists.php.net to get a copy of this message
Justin Patrin schrieb:
On 10/23/05, Sebastian Ganschow <sebastian@ganschow.net> wrote:
Hi, we've got a Problem with getting an id when we call $do->insert(). The Dataobject is configured with ignore_sequence_keys = ALL and the field
Well...this is happening *because* you have ignore_sequence_keys set to 'ALL'. Perhaps you have this set wrong? Hi,
but i thought, if I set ignore_sequence_keys to ALL, Dataobject will use the native support for getting the id of the last inserted element. The documentation of this configuration option says: " If you do not want to use pear's nextval(), for automatically filling in sequences, this can disable it for "ALL", or a list of tables "person,cart,group"" And the phpDoc for method insert() says: "*Return:* false on failure, int when auto increment or sequence used, otherwise true on success" So I don't want to use sequence keys, but the auto increment. If this behavior is correct, how can I use auto increment. Thanks Sebatian

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