From bce9e36ded717747d8ecc6fc465c9fb8f7cf7af1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 17 Aug 2016 16:37:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BConnection=E7=B1=BB=E7=9A=84g?= =?UTF-8?q?etLastInsID=E6=96=B9=E6=B3=95=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index bbdbdc6a..dea797d2 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -37,8 +37,6 @@ abstract class Connection /** @var string 当前SQL指令 */ protected $queryStr = ''; - // 最后插入ID - protected $lastInsID; // 返回或者影响记录数 protected $numRows = 0; // 事务指令数 @@ -699,10 +697,7 @@ abstract class Connection */ public function getLastInsID($sequence = null) { - if (is_null($this->lastInsID)) { - $this->lastInsID = $this->linkID->lastInsertId($sequence); - } - return $this->lastInsID; + return $this->linkID->lastInsertId($sequence); } /**