This commit is contained in:
2023-12-06 18:23:11 +08:00
parent 501ace9e36
commit 641187e240
+1 -5
View File
@@ -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();