eee
This commit is contained in:
+2
-2
@@ -70,13 +70,13 @@ class ImplodeCommand extends Command
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
while (($line = fgets($stream)) !== false) {
|
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')) {
|
if (!str_starts_with(strtoupper($insert), 'INSERT INTO')) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Coroutine::create(function () use ($waite, $insert, $data) {
|
Coroutine::create(function () use ($waite, $insert, $data) {
|
||||||
Coroutine\defer(fn() => $waite->done());
|
Coroutine\defer(fn() => $waite->done());
|
||||||
$exec = $data->createCommand(str_replace($insert,''','\\\''))->exec();
|
$exec = $data->createCommand($insert)->exec();
|
||||||
exit('exec sql result: ' . $exec);
|
exit('exec sql result: ' . $exec);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user