This commit is contained in:
as2252258@163.com
2021-07-03 13:38:36 +08:00
parent 8ebfb295ab
commit 5c3a197b52
+1 -1
View File
@@ -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);
}