On 28 Nov 2002, at 3:24, Chris Barnes wrote:

> i do
> "lock tables jobs read"
> 
> everything seemed ok so then i do
> 
> "lock tables mechanics read"
> 
> again no errors so i guess it worked..now i'm expecting to have my 2
> tables locked for read only.

In the documentation it says 
(http://www.mysql.com/doc/en/LOCK_TABLES.html):

    All tables that are locked by the current thread are
    automatically unlocked when the thread issues another LOCK
    TABLES, or when the connection to the server is closed. 

So you have to lock the two tables in the same SQL statement.

[snip]
> i have also tried locking the tables with:
> 
> "lock tables jobs mechanics read"

Look at the syntax for locking more than one table -- it uses commas: 

    LOCK TABLES jobs READ, mechanics READ

The way you're doing it, you seem to be locking 'jobs' with an alias 
of 'mechanics'.

-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org
Phone 202-667-6653

---------------------------------------------------------------------
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