我是否需要启动事务才能在共享模式锁中创建锁?
即,要么,
$dbc -> query("SELECT * FROM table WHERE id = 1 LIMIT 1 LOCK IN SHARE MODE");
或者,
$dbc -> beginTransaction();
$dbc -> query("SELECT * FROM table WHERE id = 1 LIMIT 1 LOCK IN SHARE MODE");
$dbc -> commit();
谢谢
我是否需要启动事务才能在共享模式锁中创建锁?
即,要么,
$dbc -> query("SELECT * FROM table WHERE id = 1 LIMIT 1 LOCK IN SHARE MODE");
或者,
$dbc -> beginTransaction();
$dbc -> query("SELECT * FROM table WHERE id = 1 LIMIT 1 LOCK IN SHARE MODE");
$dbc -> commit();
谢谢