AW: [PHP4BETA] Re: mysql thing
| From: | Tilli Weissenberger | Date: | Tue, 28 Dec 1999 18:23:21 +0000 |
| Subject: | AW: [PHP4BETA] Re: mysql thing | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-8603@lists.php.net to get a copy of this message | ||
That doesn't sound very fool-proof to me. What if 20 People "add" stuff to
one table at the same time, using a persistent DB connection? Who will get
which "auto inc" id?
regards, Tilli
-----Ursprungliche Nachricht-----
Von: apachev@www.sashanet.com [mailto:apachev@www.sashanet.com]Im
Auftrag von Sasha Pachev
Gesendet: Dienstag, 28. Dezember 1999 17:24
An: David Moreno S.
Cc: php4beta@lists.php.net; mysql@lists.mysql.com
Betreff: [PHP4BETA] Re: mysql thing
"David Moreno S." wrote:
>
> i'm using php4.03 b with apache and mysql in linux 6.0,
>
> i have a question is there any way to make and insert operation and get
the
> result of that operation at once.
>
> I mean i'm doing a insert into a table that has a auto_increment column,
how
> can i insert and get the value of that column for the new record?
>
> thanks
>
> David Moreno
>
> --
>
mysql_insert_id() will return the value of the last auto_increment id.
--
Sasha Pachev
http://www.sashanet.com
--
PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
For additional commands, e-mail: php4beta-help@lists.php.net
To contact the list administrators, e-mail: php4beta-admin@lists.php.net