Re: Re: last insert id in pear

From: Date: Fri, 16 Aug 2002 13:34:28 +0000
Subject: Re: Re: last insert id in pear
References: 1 2 3  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-2132@lists.php.net to get a copy of this message
reason why i needed last inserted id was for something totally differant , like syndicating data to another website which is why i needed the unique id i dont care it works, so if anyone needs that function add it to mysql.php "Markus Wolff" <wolff@21st.de> wrote in message news:20020816152709.E1BC.WOLFF@21st.de... > ...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 (#2132) next »