장수 생성시 빠르게 쿼리를 날려 중복 생성하는 것이 불가능하도록

This commit is contained in:
2019-08-18 17:50:38 +09:00
parent e2754511d9
commit 28d5a5c39a
2 changed files with 14 additions and 0 deletions
+4
View File
@@ -71,6 +71,8 @@ if ($gencount >= $maxgeneral) {
]);
}
$db->query("lock tables plock write");
//등록 시작
$db->update('general', [
'name2'=>$userNick,
@@ -81,6 +83,8 @@ $db->update('general', [
'owner'=>$userID,
], 'owner <= 0 AND npc = 2 AND no = %i', $pick);
$db->query("unlock tables");
if(!$db->affectedRows()){
Json::die([
'result'=>false,