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);