diff --git a/Database/Connection.php b/Database/Connection.php index 60500cb7..a7ad6710 100644 --- a/Database/Connection.php +++ b/Database/Connection.php @@ -273,6 +273,9 @@ class Connection extends Component 'TRUNCA' => preg_replace('/TRUNCATE\s+(\w+)\s+/', 'TRUNCATE `' . $dbname . '`.$1', $sql), default => throw new Exception('database error') }; + + $sql = preg_replace('/INNER JOIN\s+(\w+)\s/', 'INNER JOIN $1', $sql); + $command = new Command(['db' => $this, 'sql' => $sql]); return $command->bindValues($attributes); }