From 0b782de1f11fb5389845434fd19151d567cd0a60 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 6 Dec 2023 18:24:53 +0800 Subject: [PATCH] eee --- Command.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Command.php b/Command.php index 32fc706..5689714 100644 --- a/Command.php +++ b/Command.php @@ -132,11 +132,16 @@ class Command extends Component private function _execute(): bool|int { try { + /** @var PDO $client */ [$client, $prepare] = $this->_prepare(); $result = $client->lastInsertId(); $prepare->closeCursor(); $this->connection->release($client); - return $result == 0 ? $prepare->rowCount() > 0 : (int)$result; + if ($result == 0) { + return $prepare->rowCount() > 0; + } else { + return (int)$result; + } } catch (Throwable $throwable) { if ($this->isRefresh($throwable)) { return $this->_execute();