Commit e84d6b20 authored by Bill Schaller's avatar Bill Schaller

Fix nitpick from @deeky666

parent 14399bd1
...@@ -120,7 +120,7 @@ class SQLServer2012Platform extends SQLServer2008Platform ...@@ -120,7 +120,7 @@ class SQLServer2012Platform extends SQLServer2008Platform
if ($orderByPos === false if ($orderByPos === false
|| substr_count($query, "(", $orderByPos) - substr_count($query, ")", $orderByPos) || substr_count($query, "(", $orderByPos) - substr_count($query, ")", $orderByPos)
) { ) {
if (strtoupper(substr($query, 0, 15)) == 'SELECT DISTINCT') { if (stripos($query, 'SELECT DISTINCT') === 0) {
// SQL Server won't let us order by a non-selected column in a DISTINCT query, // SQL Server won't let us order by a non-selected column in a DISTINCT query,
// so we have to do this madness. This says, order by the first column in the // so we have to do this madness. This says, order by the first column in the
// result. SQL Server's docs say that a nonordered query's result order is non- // result. SQL Server's docs say that a nonordered query's result order is non-
......
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