From 4052dd313a1a87d016e8800c23b06668a9606557 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 18 Aug 2021 15:10:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Mysql/PDO.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mysql/PDO.php b/src/Mysql/PDO.php index 27f718f..1441992 100644 --- a/src/Mysql/PDO.php +++ b/src/Mysql/PDO.php @@ -237,7 +237,7 @@ class PDO implements StopHeartbeatCheck if ($prepare->execute($params) === false) { throw new Exception($prepare->errorInfo()[2] ?? static::DB_ERROR_MESSAGE); } - if (!$isInsert) { + if ($isInsert) { return (int)$this->_pdo()->lastInsertId(); } return 1;