From ee4960af78a7e46e2ef4c8d2837e1b8d60beb0e7 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 24 Aug 2016 15:35:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84getTab?= =?UTF-8?q?leInfo=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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 5b30a04b..d4bdac85 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -48,7 +48,7 @@ class Query // 参数绑定 protected $bind = []; // 数据表信息 - protected $info = []; + protected static $info = []; /** * 架构函数 @@ -1356,7 +1356,7 @@ class Query } $guid = $tableName; - if (!isset($this->info[$guid])) { + if (!isset(self::$info[$guid])) { $info = $this->connection->getFields($tableName); $fields = array_keys($info); $bind = $type = []; @@ -1374,9 +1374,9 @@ class Query } else { $pk = null; } - $this->info[$guid] = ['fields' => $fields, 'type' => $type, 'bind' => $bind, 'pk' => $pk]; + self::$info[$guid] = ['fields' => $fields, 'type' => $type, 'bind' => $bind, 'pk' => $pk]; } - return $fetch ? $this->info[$guid][$fetch] : $this->info[$guid]; + return $fetch ? self::$info[$guid][$fetch] : self::$info[$guid]; } /**