Pada Tue, 23 Jul 2002 09:19:27 +0800 "lorenzo.kh" <[EMAIL PROTECTED]> menulis :
> Hi, > Assuming that there are 2 users for MYSQL. > First user issues 'lock tables customer_table write'; > Second user wish to view the customer info using the command 'select * from > customer_table'; > This select query will be pending untill the first user issues the 'unlock > tables' command. > I am wondering is there any method that i can get the message something like > 'This customet_table is currently being locked by xxx(first user name)' > while the select query is pending. > And display this message to the second user. > Can it be done? you can run query "show processlist" and grep the specified table - the "State" columns .... Locked or not ... - from "User" columns -- Write clearly - don't be too clever. - The Elements of Programming Style (Kernighan & Plaugher) MySQL 3.23.51 : up 32 days, Queries : 354.189 per second (avg). -- Dicky Wahyu Purnomo - System Administrator PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan (12790) Phone : +62 21 79199577 - Web : http://1rstwap.com --------------------------------------------------------------------- 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