From 32c148ff2bc96a6e674807255b067600b1d9a737 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 3 May 2016 20:32:40 +0800 Subject: [PATCH] =?UTF-8?q?Query=E7=B1=BB=E7=9A=84column=E6=96=B9=E6=B3=95?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E4=BC=A0=E5=85=A5*=E5=8F=B7?= 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 5b2067c1..e956b4f8 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -131,7 +131,7 @@ class Query $result = Cache::get($guid); } if (!$result) { - $key = $key ? $key . ',' : ''; + $key = ($key && '*' != $field) ? $key . ',' : ''; $pdo = $this->field($key . $field)->fetchPdo(true)->select(); if (1 == $pdo->columnCount()) { $result = $pdo->fetchAll(PDO::FETCH_COLUMN);