From 17201e995422d95bb916d14f13dbe5f204c90c9c Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 22 Aug 2016 18:54:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=AF=B9=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E8=BF=87=E7=A8=8Bexec=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Connection.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/think/db/Connection.php b/library/think/db/Connection.php index 6d627bcf..d2fa3620 100644 --- a/library/think/db/Connection.php +++ b/library/think/db/Connection.php @@ -351,7 +351,10 @@ abstract class Connection $result = $this->PDOStatement->execute(); // 调试结束 $this->debug(false); - $procedure = 0 === strpos(strtolower(substr(trim($sql), 0, 4)), 'call'); + $call = strtolower(substr(trim($sql), 0, 4)); + if (in_array($call, ['call', 'exec'])) { + $procedure = true; + } return $this->getResult($class, $procedure); } catch (\PDOException $e) { throw new PDOException($e, $this->config, $this->queryStr);