diff --git a/Database/Command.php b/Database/Command.php index 6af8a7be..0e5c4c01 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -129,6 +129,9 @@ class Command extends Component } else { $result = $this->search($type); } + if ($this->prepare) { + $this->prepare->closeCursor(); + } return $result; } catch (\Throwable $exception) { return $this->addError($this->sql . '. error: ' . $exception->getMessage(), 'mysql');