From 49892feff488ccc7bf5f3fb9e482f1c412290777 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 3 Jul 2021 13:31:33 +0800 Subject: [PATCH] modify --- Database/Connection.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/Connection.php b/Database/Connection.php index 5b0e6365..09480340 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -265,7 +265,7 @@ class Connection extends Component */ public function createCommand($sql = null, array $attributes = []): Command { - $sql = preg_replace('/FROM\s+(\w+)\s+/', 'FROM `' . $this->database . '`.$1', $sql); + $sql = preg_replace('/FROM\s+(\w+)\s+/', 'FROM `' . $this->database . '`.$1 ', $sql); $command = new Command(['db' => $this, 'sql' => $sql]); return $command->bindValues($attributes);