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