Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread SLanger
Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce(SELECT LAST_INSERT_ID()); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve this little huge bug ; )

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-16 Thread John W. Holmes
[EMAIL PROTECTED] wrote: Hello Not sure if you thought of it or if it even applies to you but when you use PEAR::DB::getOnce(SELECT LAST_INSERT_ID()); to retrieve the id do consider concurrent access to the database when using it for inserting stuff. Been there and its a hassle to resolve

Re: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-15 Thread Rory McKinley
On 14 Jan 2004 at 18:12, Alessandro Vitale wrote: I would like to get the last insert id... anyone has some experience in using the PEAR::DB_Common::nextId() ? any suggestion would be very much appreciated. alessandro -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-15 Thread Dagfinn Reiersøl
Alessandro Vitale wrote: I would like to get the last insert id... anyone has some experience in using the PEAR::DB_Common::nextId() ? Yes. You have a PEAR DB object $db, and you do: $id = $db-nextID('Documents'); $db-query(INSERT INTO Documents (id,title,text) VALUES ($id,'Title','Text'));

[PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-15 Thread Alessandro Vitale
. cheers alessandro -Messaggio originale- Da: Rory McKinley [mailto:[EMAIL PROTECTED] Inviato: giovedi 15 gennaio 2004 8.06 A: Alessandro Vitale; [EMAIL PROTECTED] Oggetto: Re: [PHP][PEAR] PEAR::DB_Common::nextId() On 14 Jan 2004 at 18:12, Alessandro Vitale wrote: I would like to get

Re: [PHP] R: [PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-15 Thread David T-G
Alessandro -- ...and then Alessandro Vitale said... % % hi, Hi! % % thanks to Rory for his suggestion. % sure mysql_insert_id() could help. but I was looking for some trick for % accessing the result of that function without having to deal to % mysql_connect() again. But how will you query

[PHP][PEAR] PEAR::DB_Common::nextId()

2004-01-14 Thread Alessandro Vitale
I would like to get the last insert id... anyone has some experience in using the PEAR::DB_Common::nextId() ? any suggestion would be very much appreciated. alessandro -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php