This commit is contained in:
2026-01-11 19:59:20 +08:00
parent 0f01416351
commit 9c6340d0b3
+3 -2
View File
@@ -164,13 +164,14 @@ class Command extends Component
throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]);
}
var_dump($client->inTransaction(), $prepare->errorInfo(), $client->lastInsertId());
$prepare->closeCursor();
$result = $client->lastInsertId();
$this->connection->println($startTime, microtime(true), $this->sql, $this->params);
if (str_starts_with($this->sql, 'DELETE')) {
return $prepare->rowCount();
}
return $result == 0 ? $prepare->rowCount() : (int)$result;
} catch (Throwable $throwable) {