From 3e6e8ea824e4bee014f4e07e53b2cce884b18205 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Wed, 28 Apr 2021 10:56:02 +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 --- Database/Command.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index d3930b37..34925549 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -174,14 +174,12 @@ class Command extends Component */ private function insert_or_change($isInsert, $hasAutoIncrement): bool|string|int { - if (!($result = $this->initPDOStatement())) { - var_dump($result); + if (($result = $this->initPDOStatement()) === false) { return $result; } if ($isInsert === false) { return true; } - var_dump($result); if ($result == 0 && $hasAutoIncrement->isAutoIncrement()) { return $this->addError(static::DB_ERROR_MESSAGE, 'mysql'); } @@ -207,7 +205,6 @@ class Command extends Component return $this->addError($this->sql . ':' . $error, 'mysql'); } $result = $prepare->execute($this->params); - var_dump($result, $connect->errorInfo()); defer(fn() => $prepare->closeCursor()); if ($result === false) { return $this->addError($connect->errorInfo()[2], 'mysql');