This commit is contained in:
as2252258@163.com
2021-07-03 13:31:33 +08:00
parent 7fcf535617
commit 49892feff4
+1 -1
View File
@@ -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);