eee
This commit is contained in:
+6
-1
@@ -132,11 +132,16 @@ class Command extends Component
|
|||||||
private function _execute(): bool|int
|
private function _execute(): bool|int
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
/** @var PDO $client */
|
||||||
[$client, $prepare] = $this->_prepare();
|
[$client, $prepare] = $this->_prepare();
|
||||||
$result = $client->lastInsertId();
|
$result = $client->lastInsertId();
|
||||||
$prepare->closeCursor();
|
$prepare->closeCursor();
|
||||||
$this->connection->release($client);
|
$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) {
|
} catch (Throwable $throwable) {
|
||||||
if ($this->isRefresh($throwable)) {
|
if ($this->isRefresh($throwable)) {
|
||||||
return $this->_execute();
|
return $this->_execute();
|
||||||
|
|||||||
Reference in New Issue
Block a user