From 2e192a64fde75777a3c2fbd56530474a46394c76 Mon Sep 17 00:00:00 2001 From: WispX <1591788658@qq.com> Date: Tue, 1 Jan 2019 18:28:06 +0800 Subject: [PATCH] fix --- application/index/controller/Install.php | 7 +------ update.sql | 6 +++--- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/application/index/controller/Install.php b/application/index/controller/Install.php index 02d7bef4..de8728e1 100644 --- a/application/index/controller/Install.php +++ b/application/index/controller/Install.php @@ -242,12 +242,7 @@ EOT; } } - foreach (explode(';', $file) as $item) { - if ($item && !$mysqli->query($item . ';')) { - throw new Exception('数据写入失败'); - } - } - + $mysqli->multi_query($file); $mysqli->commit(); $mysqli->autocommit(true); $mysqli->close(); diff --git a/update.sql b/update.sql index 21d12a90..71c286ad 100644 --- a/update.sql +++ b/update.sql @@ -43,6 +43,6 @@ CREATE TABLE IF NOT EXISTS `lsky_folders` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='文件夹表'; -- v1.4.2 -UPDATE `lsky_config` SET `value` = '1.4.2' WHERE `lsky_config`.`name` = 'system_version'; -UPDATE `lsky`.`lsky_images` SET `strategy` = 'uss' WHERE `lsky_images`.`strategy` = 'upyun'; -UPDATE `lsky`.`lsky_images` SET `strategy` = 'kodo' WHERE `lsky_images`.`strategy` = 'qiniu'; \ No newline at end of file +UPDATE `lsky_config` SET `value` = '1.4.2' WHERE `lsky_config` = 'system_version'; +UPDATE `lsky_images` SET `strategy` = 'uss' WHERE `lsky_images`.`strategy` = 'upyun'; +UPDATE `lsky_images` SET `strategy` = 'kodo' WHERE `lsky_images`.`strategy` = 'qiniu'; \ No newline at end of file