refac, wip: con 삭제,생성 관련

This commit is contained in:
2023-07-07 10:57:52 +00:00
parent 49429e1e7e
commit 758ae06fd9
4 changed files with 10 additions and 2 deletions
+7
View File
@@ -1,6 +1,8 @@
<?php
namespace sammo;
use sammo\Enums\GeneralAccessLogColumn;
include "lib.php";
include "func.php";
@@ -86,6 +88,11 @@ $db->update('general', [
'owner'=>$userID,
'aux'=>Json::encode($genAux)
], 'owner <= 0 AND npc = 2 AND no = %i', $pick);
$db->insertIgnore('general_access_log', [
GeneralAccessLogColumn::generalID->value => $generalID,
GeneralAccessLogColumn::userID->value => $userID,
GeneralAccessLogColumn::lastRefresh->value => $now,
]);
if(!$db->affectedRows()){
Json::die([