From bc43a32b10c58be657fd8dc356365ab13c5416b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sat, 30 Sep 2023 19:56:02 +0800 Subject: [PATCH] eee --- ImplodeCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ImplodeCommand.php b/ImplodeCommand.php index 79580b4..16c4e5c 100644 --- a/ImplodeCommand.php +++ b/ImplodeCommand.php @@ -70,14 +70,14 @@ class ImplodeCommand extends Command return 0; } while (($line = fgets($stream)) !== false) { - $insert = html_entity_decode(str_replace($line,''','\\\'')); + $insert = html_entity_decode($line); if (!str_starts_with(strtoupper($insert), 'INSERT INTO')) { continue; } + $waite->add(); Coroutine::create(function () use ($waite, $insert, $data) { Coroutine\defer(fn() => $waite->done()); - $exec = $data->createCommand($insert)->exec(); - exit('exec sql result: ' . $exec); + $data->createCommand($insert)->exec(); }); } fclose($stream);