From 45d848cbb966ed92e3a44616029d05e994faab52 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sun, 21 Apr 2019 02:55:32 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B2=84=EA=B7=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hwe/func_time_event.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/hwe/func_time_event.php b/hwe/func_time_event.php index 725507fa..a7f89bfd 100644 --- a/hwe/func_time_event.php +++ b/hwe/func_time_event.php @@ -526,14 +526,8 @@ function getRiceOutcome($nation, $bill) { function tradeRate() { $db = DB::db(); - $connect=$db->get(); - $query = "select city,level,trade from city"; // 도시 목록 - $cityresult = MYDB_query($query, $connect) or Error(__LINE__.MYDB_error($connect),""); - $citycount = MYDB_num_rows($cityresult); - - for($i=0; $i < $citycount; $i++) { - $city = MYDB_fetch_array($cityresult); + foreach($db->query('SELECT city,level FROM city') as $city){ //시세 switch($city['level']) { case 1: $per = 0; break; @@ -551,7 +545,7 @@ function tradeRate() { } else { $trade = null; } - $update('city', [ + $db->update('city', [ 'trade'=>$trade ], 'city=%i', $city['city']); }