|
|
@@ -360,12 +360,22 @@ class SgListView |
|
|
|
if ($orderWay == '') $orderWay = 'desc';
|
|
|
|
//排序方式
|
|
|
|
$ordersql = '';
|
|
|
|
if ($orderby == 'senddate' || $orderby == 'id') {
|
|
|
|
$ordersql = " ORDER BY arc.aid $orderWay";
|
|
|
|
} else if ($orderby == 'hot' || $orderby == 'click') {
|
|
|
|
if ($orderby == "senddate") {
|
|
|
|
$ordersql = " ORDER BY arc.senddate $orderWay";
|
|
|
|
} else if ($orderby == "pubdate") {
|
|
|
|
$ordersql = " ORDER BY arc.pubdate $orderWay";
|
|
|
|
} else if ($orderby == "id") {
|
|
|
|
$ordersql = " ORDER BY arc.id $orderWay";
|
|
|
|
} else if ($orderby == "hot" || $orderby == "click") {
|
|
|
|
$ordersql = " ORDER BY arc.click $orderWay";
|
|
|
|
} else if ($orderby == "lastpost") {
|
|
|
|
$ordersql = " ORDER BY arc.lastpost $orderWay";
|
|
|
|
} else if ($orderby == "scores") {
|
|
|
|
$ordersql = " ORDER BY arc.scores $orderWay";
|
|
|
|
} else if ($orderby == "rand") {
|
|
|
|
$ordersql = " ORDER BY rand()";
|
|
|
|
} else {
|
|
|
|
$ordersql = " ORDER BY arc.aid $orderWay";
|
|
|
|
$ordersql = " ORDER BY arc.sortrank $orderWay";
|
|
|
|
}
|
|
|
|
$addField = 'arc.'.join(',arc.', $this->ListFields);
|
|
|
|
//如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢
|
|
|
@@ -703,12 +713,22 @@ class SgListView |
|
|
|
if ($innertext == '') $innertext = GetSysTemplets('list_sglist.htm');
|
|
|
|
//排序方式
|
|
|
|
$ordersql = '';
|
|
|
|
if ($orderby == 'senddate' || $orderby == 'id') {
|
|
|
|
$ordersql = " ORDER BY arc.aid $orderWay";
|
|
|
|
} else if ($orderby == 'hot' || $orderby == 'click') {
|
|
|
|
if ($orderby == "senddate") {
|
|
|
|
$ordersql = " ORDER BY arc.senddate $orderWay";
|
|
|
|
} else if ($orderby == "pubdate") {
|
|
|
|
$ordersql = " ORDER BY arc.pubdate $orderWay";
|
|
|
|
} else if ($orderby == "id") {
|
|
|
|
$ordersql = " ORDER BY arc.id $orderWay";
|
|
|
|
} else if ($orderby == "hot" || $orderby == "click") {
|
|
|
|
$ordersql = " ORDER BY arc.click $orderWay";
|
|
|
|
} else if ($orderby == "lastpost") {
|
|
|
|
$ordersql = " ORDER BY arc.lastpost $orderWay";
|
|
|
|
} else if ($orderby == "scores") {
|
|
|
|
$ordersql = " ORDER BY arc.scores $orderWay";
|
|
|
|
} else if ($orderby == "rand") {
|
|
|
|
$ordersql = " ORDER BY rand()";
|
|
|
|
} else {
|
|
|
|
$ordersql = " ORDER BY arc.aid $orderWay";
|
|
|
|
$ordersql = " ORDER BY arc.sortrank $orderWay";
|
|
|
|
}
|
|
|
|
$addField = 'arc.'.join(',arc.', $this->ListFields);
|
|
|
|
//如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢
|
|
|
|