Commit 139298a6 authored by Shane Neuerburg's avatar Shane Neuerburg

[DBAL-497] Fix SQL Server replacing 'FROM' in column names

parent 4485d196
......@@ -845,7 +845,7 @@ class SQLServerPlatform extends AbstractPlatform
}
//Replace only first occurrence of FROM with $over to prevent changing FROM also in subqueries.
$query = preg_replace('/\sFROM/i', ", ROW_NUMBER() OVER ($over) AS doctrine_rownum FROM", $query, 1);
$query = preg_replace('/\sFROM\s/i', ", ROW_NUMBER() OVER ($over) AS doctrine_rownum FROM ", $query, 1);
$start = $offset + 1;
$end = $offset + $limit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment