This commit is contained in:
2023-08-31 12:29:02 +08:00
parent a3fa4521fc
commit 0bff75446d
+1 -1
View File
@@ -147,7 +147,7 @@ class Command extends Component
try { try {
$client = $this->connection->getConnection(); $client = $this->connection->getConnection();
if (($prepare = $client->prepare($this->sql)) === false) { if (($prepare = $client->prepare($this->sql)) === false) {
throw new Exception($client->errorInfo()[1]); throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]);
} }
if ($prepare->execute($this->params) === false) { if ($prepare->execute($this->params) === false) {
throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]); throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]);