From a3fa4521fcb960741c37cb372a73049d576f51ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 30 Aug 2023 23:25:21 +0800 Subject: [PATCH] eee --- Command.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command.php b/Command.php index a5a3c91..c325e55 100644 --- a/Command.php +++ b/Command.php @@ -109,7 +109,7 @@ class Command extends Component try { $client = $this->connection->getConnection(); if (($prepare = $client->prepare($this->sql)) === false) { - throw new Exception($client->errorInfo()[1]); + throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $client->errorInfo()[2]); } $prepare->execute($this->params); $data = $prepare->{$method}(PDO::FETCH_ASSOC); @@ -150,7 +150,7 @@ class Command extends Component throw new Exception($client->errorInfo()[1]); } if ($prepare->execute($this->params) === false) { - throw new Exception($prepare->errorInfo()[1]); + throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]); } $result = $client->lastInsertId(); $prepare->closeCursor();