Re: R: [PHP][PEAR] PEAR::DB_Common::nextId()
| From: | David T-G | Date: | Thu, 15 Jan 2004 15:03:41 +0000 |
| Subject: | Re: R: [PHP][PEAR] PEAR::DB_Common::nextId() | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174653@lists.php.net to get a copy of this message | ||
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 the DB then?
% and i found it: PEAR::DB::getOnce("SELECT LAST_INSERT_ID()");
Believe me, this has to be connected or it's doing the connect for you.
% doesn't work perfectly but is ok.
If that's good enough for you, then that's fine :-)
%
% cheers
%
% alessandro
HTH & HAND
:-D
--
David T-G * There is too much animal courage in
(play) davidtg@justpickone.org * society and not sufficient moral courage.
(work) davidtgwork@justpickone.org -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/ Shpx gur
Pbzzhavpngvbaf Qrprapl Npg!