That's for Perl - right? For PHP there mysql_isert_id. Whatever.
> for that purpose, you can use the mysql_insertid() function.
>
>
> Rgds,
> Tfr
>
> --==< [EMAIL PROTECTED] >==< MySQL development team >==< Tallinn / Estonia >==--
>
>
Check lock/unlock table in the manual
http://www.mysql.com/doc/L/O/LOCK_TABLES.html
ie.
LOCK TABLES tbl_name WRITE (or READ)
insert ...
select ...
UNLOCK TABLES
On Tue, 30 Jan 2001, Nino Katic wrote:
> Hi,
>
> How to solve this:
> TABLE: shop
> FIELD: article int unsigned auto_increment
>
>
Hi,
> TABLE: shop
> FIELD: article int unsigned auto_increment
>
> 1) insert into shop values (null);
> 2) select max(article) from shop;
for that purpose, you can use the mysql_insertid() function.
Rgds,
Tfr
--==< [EMAIL PROTECTED] >==< MySQL development team >==< T
Hi,
How to solve this:
TABLE: shop
FIELD: article int unsigned auto_increment
1) insert into shop values (null);
2) select max(article) from shop;
I want to make sure there will be no insert between 1) and 2) by some
other user. So how to make this? Thx.
Nino
-