From 142b4b69ee21365356ea7be0b168fc64b7536341 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=81=E5=91=A8=E9=83=A8=E8=90=BD?= Date: Tue, 17 Aug 2021 10:28:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20MySQL=205.7=20=E7=BE=A4?= =?UTF-8?q?=E7=BB=84=E6=8E=92=E5=BA=8F=E5=BC=82=E5=B8=B8=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upload/source/class/table/table_forum_forum.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/upload/source/class/table/table_forum_forum.php b/upload/source/class/table/table_forum_forum.php index 759e4f808..159ec3f0f 100644 --- a/upload/source/class/table/table_forum_forum.php +++ b/upload/source/class/table/table_forum_forum.php @@ -287,7 +287,7 @@ class table_forum_forum extends discuz_table } $orderbyarray = array('displayorder' => 'f.displayorder DESC', 'dateline' => 'ff.dateline DESC', 'lastupdate' => 'ff.lastupdate DESC', 'membernum' => 'ff.membernum DESC', 'thread' => 'f.threads DESC', 'activity' => 'f.commoncredits DESC'); $useindex = $orderby == 'displayorder' ? 'USE INDEX(fup_type)' : ''; - $orderby = !empty($orderby) && $orderbyarray[$orderby] ? "ORDER BY ".$orderbyarray[$orderby] : ''; + $orderby = !empty($orderby) && $orderbyarray[$orderby] ? "ORDER BY ".$orderbyarray[$orderby].', fid DESC' : 'ORDER BY fid DESC'; $limitsql = $num ? "LIMIT $start, $snum " : ''; $field = $sort ? 'fup' : 'fid'; $fids = $fids && is_array($fids) ? 'f.'.$field.' IN ('.dimplode($fids).')' : ''; -- Gitee