为啥给表加了读锁之后无法把数据查询出来

WBOY
Release: 2016-06-13 12:34:28
Original
852 people have browsed it

为什么给表加了读锁之后无法把数据查询出来?

mysql_query("LOCK TABLES tablename READ;");<br />
$result=mysql_query($sql, $conn);<br />
mysql_query("UNLOCK TABLES;");
Copy after login

注释掉第一条语句之后能够正常地把记录查询出来,但是一旦使用第一条语句就什么都查不出来了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template