일부 DB 값 관련 정보 변경. update 쿼리, insert into 쿼리 일부 변경

This commit is contained in:
2018-10-20 17:41:48 +09:00
parent 3536b01981
commit 18ae2f121a
8 changed files with 210 additions and 119 deletions
+8 -4
View File
@@ -163,16 +163,20 @@ function pushNationHistory($nation, ?string $history) {
if(!$nation || !$nation['nation']){
return;
}
DB::db()->query("UPDATE nation set history=concat(%s, history) where nation=%i",
$history.'<br>', $nation['nation']);
$db = DB::db();
$db->update('nation', [
'history'=>$db->sqleval('concat(%s, history)', $history.'<br>')
], 'nation=%i', $nation['nation']);
}
function pushGeneralHistory($me, ?string $history) {
if(!$history){
return;
}
DB::db()->query("UPDATE general set history=concat(%s, history) where no=%i",
$history.'<br>', $me['no']);
$db = DB::db();
$db->update('general', [
'history'=>$db->sqleval('concat(%s, history)', $history.'<br>')
], 'nation=%i', $me['no']);
}
function getGeneralHistoryAll(int $no) {