From 1d30c47de3bd695a657c6439188c459815881b51 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Tue, 1 Nov 2016 18:17:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BQuery=E7=B1=BB=E7=9A=84alias?= =?UTF-8?q?=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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/db/Query.php b/library/think/db/Query.php index 785571db..91af4997 100644 --- a/library/think/db/Query.php +++ b/library/think/db/Query.php @@ -1189,6 +1189,9 @@ class Query } else { if (isset($this->options['table'])) { $table = is_array($this->options['table']) ? key($this->options['table']) : $this->options['table']; + if (false !== strpos($table, '__')) { + $table = $this->parseSqlTable($table); + } } else { $table = $this->getTable(); }