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
> 
>       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 
> 
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
> 
> 

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to