From 5c3a197b520fe502a6f87846b556e217247eca72 Mon Sep 17 00:00:00 2001 From: "as2252258@163.com" Date: Sat, 3 Jul 2021 13:38:36 +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 4fb708dc..ce3b022e 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -272,8 +272,8 @@ class Connection extends Component 'UPDATE' => preg_replace('/UPDATE\s+(\w+)\s+SET/', 'UPDATE `' . $this->database . '`.$1 SET', $sql), 'DELETE' => preg_replace('/DELETE FROM\s+(\w+)\s+/', 'DELETE FROM `' . $this->database . '`.$1', $sql), 'INSERT' => preg_replace('/INSERT INTO\s+(\w+)\s+/', 'INSERT INTO `' . $this->database . '`.$1', $sql), + default => throw new Exception('database error') }; - $command = new Command(['db' => $this, 'sql' => $sql]); return $command->bindValues($attributes); }