From d56b28a4aa6dff1f1ad796b6408507bd3c51221d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Wed, 10 Nov 2021 10:18:45 +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/Command.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Command.php b/src/Command.php index f3286e9..e581903 100644 --- a/src/Command.php +++ b/src/Command.php @@ -119,7 +119,7 @@ class Command extends Component try { $time = microtime(true); if ($type === static::EXECUTE) { - $result = $this->insert_or_change(); + $result = $this->db->getConnect($this->sql)->execute($this->sql,$this->params); } else { $result = $this->search($type); } @@ -156,16 +156,6 @@ class Command extends Component } - /** - * @return bool|int - * @throws Exception - */ - private function insert_or_change(): bool|int - { - $pdo = $this->db->getConnect($this->sql); - return $pdo->execute($this->sql,$this->params); - } - /** * @return int|bool|array|string|null * @throws Exception