mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进
This commit is contained in:
@@ -563,6 +563,10 @@ abstract class Builder
|
||||
*/
|
||||
protected function parseOrder($order, $options = [])
|
||||
{
|
||||
if (empty($order)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$array = [];
|
||||
foreach ($order as $key => $val) {
|
||||
if ($val instanceof Expression) {
|
||||
|
||||
@@ -35,6 +35,9 @@ class Sqlsrv extends Builder
|
||||
*/
|
||||
protected function parseOrder($order, $options = [])
|
||||
{
|
||||
if (empty($order)) {
|
||||
return ' ORDER BY rand()';
|
||||
}
|
||||
|
||||
$array = [];
|
||||
foreach ($order as $key => $val) {
|
||||
@@ -55,7 +58,7 @@ class Sqlsrv extends Builder
|
||||
}
|
||||
$order = implode(',', $array);
|
||||
|
||||
return !empty($order) ? ' ORDER BY ' . $order : ' ORDER BY rand()';
|
||||
return ' ORDER BY ' . $order;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user