From 63aa31cb921b98449514fd6d61d4206dd6dad193 Mon Sep 17 00:00:00 2001 From: hide_d Date: Sat, 31 Mar 2018 00:33:39 +0900 Subject: [PATCH] =?UTF-8?q?sql=20=EC=9D=BC=EA=B4=84=20=EB=8F=99=EC=9E=91?= =?UTF-8?q?=20=EC=9E=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- f_install/j_setup_db.php | 2 +- twe/j_install.php | 18 +++++++++++++++--- twe/j_install_db.php | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/f_install/j_setup_db.php b/f_install/j_setup_db.php index 910fd2a3..7e47fc8a 100644 --- a/f_install/j_setup_db.php +++ b/f_install/j_setup_db.php @@ -124,7 +124,7 @@ $rootDB->error_handler = 'dbSQLFail'; $mysqli_obj = $rootDB->get(); //로그인에 실패할 경우 자동으로 dbConnFail()이 실행됨. if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/common_schema.sql'))){ - while ($mysqli_obj->next_result()) {;} + while (@$mysqli_obj->next_result()) {;} } $rootDB->insert('system', array( diff --git a/twe/j_install.php b/twe/j_install.php index 8d910e94..c0c3660f 100644 --- a/twe/j_install.php +++ b/twe/j_install.php @@ -55,17 +55,29 @@ if(120 % $turnterm != 0){ ]); } -$mysqli_obj = DB::db()->get(); +$db = DB::db(); +$mysqli_obj = $db->get(); +$scenarioObj = new Scenario($scenario); + if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/reset.sql'))){ - while ($mysqli_obj->next_result()) {;} + while (@$mysqli_obj->next_result()) {;} } if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/schema.sql'))){ - while ($mysqli_obj->next_result()) {;} + while (@$mysqli_obj->next_result()) {;} } +$db->insert('plock', [ + 'plock'=>0 +]); + +/* +$db->insert('game', [ + +]); +*/ //TODO:script $env = [ diff --git a/twe/j_install_db.php b/twe/j_install_db.php index 93719572..ec78e1cf 100644 --- a/twe/j_install_db.php +++ b/twe/j_install_db.php @@ -30,7 +30,7 @@ if($fullReset && class_exists('\\sammo\\DB')){ $mysqli_obj = DB::db()->get(); if($mysqli_obj->multi_query(file_get_contents(__dir__.'/sql/reset.sql'))){ - while ($mysqli_obj->next_result()) {;} + while (@$mysqli_obj->next_result()) {;} } }