From 64cba15bd3041291370736e6c6d112203e0eac69 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Thu, 6 Apr 2017 22:33:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84=E8=BD=AF?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/builder/Mysql.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/think/db/builder/Mysql.php b/library/think/db/builder/Mysql.php index 4aac4424..5bc9d03b 100644 --- a/library/think/db/builder/Mysql.php +++ b/library/think/db/builder/Mysql.php @@ -47,6 +47,9 @@ class Mysql extends Builder $key = '`' . $key . '`'; } if (isset($table)) { + if (strpos($table, '.')) { + $table = str_replace('.', '`.`', $table); + } $key = '`' . $table . '`.' . $key; } return $key;