I want to lock a specific table for reading, but when I requested
mysql_query("LOCK TABLES unique_voucher READ");
into the database, it allows me to read only this table, but not other tables.
Is it possible to lock this particular table ONLY and does not allow users to query this table before completing any process?
(this is because I keep the counter, and if many users connect at once, they can get ambiguous numbers, so until one user is ready with one process, I want to block reading for the table)
source
share