From ac7dbafab2d306381ca9e1bca059793e61383f77 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 5 Jul 2017 13:32:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96query=E7=B1=BB=E7=9A=84insert?= =?UTF-8?q?=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Query.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 1ab48f46..6c10f236 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -2080,7 +2080,7 @@ class Query } // 执行操作 - $result = $this->execute($sql, $bind); + $result = 0 === $sql ? 0 : $this->execute($sql, $bind); if ($result) { $sequence = $sequence ?: (isset($options['sequence']) ? $options['sequence'] : null); $lastInsId = $this->getLastInsID($sequence);