Re: Db_dataobject insert()

From: Date: Wed, 26 Jan 2005 18:49:14 +0000
Subject: Re: Db_dataobject insert()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-17178@lists.php.net to get a copy of this message
On Wed, 26 Jan 2005 16:33:04 +0100, mishal@centrum.cz <mishal@centrum.cz> wrote: > Hello, > > i have problems with db_dataobject insert() method. > it should return the ID of the inserted element. > i found in mailing list archive, that this problem was reported > before. > > http://marc.theaimsgroup.com/?l=pear-general&m=110186296714930&w=2 > > i have installed db_dataobject version 1.7.2., > use mysql 4.0.2. > > is this problem fixed? > The insert method does not return the ID AFAIK. It does, however, set it in the DO. So somehting like: $do->insert(); echo $do->id; should work. It's what I use. -- Justin Patrin

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