From c4c6d9a58ebc1f4aab98545eebb35ef20787f536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 29 Jun 2021 14:00:47 +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 | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Database/Command.php b/Database/Command.php index c015f4d6..58bd3228 100644 --- a/Database/Command.php +++ b/Database/Command.php @@ -121,8 +121,6 @@ class Command extends Component private function execute($type, $isInsert = null, mixed $hasAutoIncrement = null): int|bool|array|string|null { try { - $this->debug('Execute: ' . $this->sql); - $time = microtime(true); if ($type === static::EXECUTE) { $result = $this->insert_or_change($isInsert, $hasAutoIncrement); @@ -130,7 +128,7 @@ class Command extends Component $result = $this->search($type); } if (microtime(true) - $time >= 0.02) { - $this->debug('Mysql:' . Json::encode([$this->sql, $this->params])); + $this->debug('Mysql:' . Json::encode([$this->sql, $this->params]) . (microtime(true) - $time)); } if ($this->prepare) { $this->prepare->closeCursor();