diff options
Diffstat (limited to 'lib/SqlFormatter.php')
-rw-r--r-- | lib/SqlFormatter.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/SqlFormatter.php b/lib/SqlFormatter.php index 2f04763..f48e947 100644 --- a/lib/SqlFormatter.php +++ b/lib/SqlFormatter.php @@ -642,6 +642,11 @@ class SqlFormatter } } + //Checks if there is another SQL command after the LIMIT clause. If yes, not suppress newline + elseif ($token[self::TOKEN_VALUE] === ';' && $clause_limit === true) { + $clause_limit = false; + } + // Commas start a new line (unless within inline parentheses or SQL 'LIMIT' clause) elseif ($token[self::TOKEN_VALUE] === ',' && !$inline_parentheses) { //If the previous TOKEN_VALUE is 'LIMIT', resets new line |