From 3bcb764973daa99b14f576b614ae91e039c51c1b Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 21 May 2016 14:42:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3Builder=E7=B1=BB=E7=9A=84sele?= =?UTF-8?q?ctinsert=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/db/Builder.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/think/db/Builder.php b/library/think/db/Builder.php index 933c3b5d..91485f86 100644 --- a/library/think/db/Builder.php +++ b/library/think/db/Builder.php @@ -612,8 +612,7 @@ abstract class Builder } $fields = array_map([$this, 'parseKey'], $fields); - $sql = 'INSERT INTO ' . $this->parseTable($table) . ' (' . implode(',', $fields) . ') '; - $sql .= $this->buildSelectSql($options); + $sql = 'INSERT INTO ' . $this->parseTable($table) . ' (' . implode(',', $fields) . ') ' . $this->select($options); return $sql; }