This commit is contained in:
2023-09-30 19:53:44 +08:00
parent beb541f01b
commit f61c678d54
+2 -2
View File
@@ -70,13 +70,13 @@ class ImplodeCommand extends Command
return 0;
}
while (($line = fgets($stream)) !== false) {
$insert = html_entity_decode($line);
$insert = html_entity_decode(str_replace($line,''','\\\''));
if (!str_starts_with(strtoupper($insert), 'INSERT INTO')) {
continue;
}
Coroutine::create(function () use ($waite, $insert, $data) {
Coroutine\defer(fn() => $waite->done());
$exec = $data->createCommand(str_replace($insert,''','\\\''))->exec();
$exec = $data->createCommand($insert)->exec();
exit('exec sql result: ' . $exec);
});
}