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);