Re: Re: last insert id in pear

From: Date: Fri, 16 Aug 2002 13:29:58 +0000
Subject: Re: Re: last insert id in pear
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2131@lists.php.net to get a copy of this message
...which is exactly the point. If you want to be database-independent, use sequences (or, in case of MySQL, sequence emulation), not auto_increment fields and stuff like mysql_insert_id. On Fri, 16 Aug 2002 19:51:18 +1000 "electroteque" <daniel@electroteque.org> wrote: > urrg all it has is nextid for seqeunces > > "Christian Dickmann" <chrisdicki@gmx.de> wrote in message > news:20020815161629.43599.qmail@pb1.pair.com... > > > function lastinsertId(){ > > > $id = mysql_insert_id($this->connection); > > > return $id; > > > } > > > > > > so all u do is > > > > > > $id = $db->lastinsertId(); > > > > Maybe we should add a method like this one: > > > > function lastInsertId() { > > echo "STOP! Turn around and see the Manual at pear.php.net"; > > }; > > > > Christian Dickmann > > > > > > > > -- > PEAR General Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- Markus Wolff <wolff@21st.de>

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