RE: [PHPLIB] Insert -> select From: Howard Ha (howardh <email protected>)
Date: 02/28/00

I don't think this is an issue because the nextid function requests a lock
on the table (at least in the MySQL class)

Howard

> -----Original Message-----
> From: phplib-owner <email protected>
> [mailto:phplib-owner <email protected>]On Behalf Of Michael S. Steuer
> Sent: Monday, February 28, 2000 2:38 AM
> To: Martin Decker; phplib <email protected>
> Subject: RE: [PHPLIB] Insert -> select
>
>
>
> |3) and finally before inserting write:
> |
> |$id = $db->nextid("tablename");
> |...
> |$sql = "insert into tablename ($id, "text",....)";
> |...
>
> Wouldn't retrieving the id before the actual insert cause problems in case
> of concurrent inserts at approx. the same moment?
>
> regards,
>
> Michael.
>
> -
> PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
> To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
> the body, not the subject, of your message.
>

-
PHP3 Base Library Mailing List. Send messages to <phplib <email protected>>.
To unsubscribe, send "unsubscribe" to <phplib-request <email protected>> in
the body, not the subject, of your message.