1
0
mirror of synced 2025-01-31 04:21:44 +03:00

Fixed removal of ASC and DESC keywords from orderby items that will be included in select list

This commit is contained in:
Bill Schaller 2014-12-17 16:00:54 -05:00 committed by Marco Pivetta
parent 39aeb9935b
commit 3fd3da3d46

View File

@ -289,7 +289,7 @@ class LimitSubqueryOutputWalker extends SqlWalker
// The order by items are not required to be in the select list on Oracle and PostgreSQL, but
// for the sake of simplicity, order by items will be included in the select list on all platforms.
// This doesn't impact functionality.
$selectListAdditions[] = trim(str_ireplace(array("asc", "desc"), "", $orderByItem));
$selectListAdditions[] = trim(preg_replace('/([^ ]+) (?:asc|desc)/i', '$1', $orderByItem));
$orderByItems[] = $orderByItem;
}