From 641187e2405d0fb00b04e944c3b74cf71190a580 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 6 Dec 2023 18:23:11 +0800 Subject: [PATCH] eee --- Command.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Command.php b/Command.php index cdea82b..32fc706 100644 --- a/Command.php +++ b/Command.php @@ -135,12 +135,8 @@ class Command extends Component [$client, $prepare] = $this->_prepare(); $result = $client->lastInsertId(); $prepare->closeCursor(); - $rowCount = $prepare->rowCount(); $this->connection->release($client); - if ($rowCount < 1) { - return trigger_print_error("更新失败", 'mysql'); - } - return $result == 0 ? true : (int)$result; + return $result == 0 ? $prepare->rowCount() > 0 : (int)$result; } catch (Throwable $throwable) { if ($this->isRefresh($throwable)) { return $this->_execute();