|
|
@@ -471,7 +471,7 @@ class ListView |
|
|
|
$addJoin = '';
|
|
|
|
}
|
|
|
|
//如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢
|
|
|
|
if (preg_match('/hot|click|lastpost|rand/', $orderby)) {
|
|
|
|
if (preg_match('/senddate|pubdate|hot|click|lastpost|rand/', $orderby)) {
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,mb.uname,mb.face,mb.userid $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb ON arc.mid=mb.mid $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row";
|
|
|
|
}
|
|
|
|
//普通情况先从arctiny表查出id,然后按id查询速度非常快
|
|
|
@@ -893,7 +893,7 @@ class ListView |
|
|
|
$addJoin = '';
|
|
|
|
}
|
|
|
|
//如果不用默认的sortrank或id排序,使用联合查询数据量大时非常缓慢
|
|
|
|
if (preg_match('/hot|click|lastpost|rand/', $orderby)) {
|
|
|
|
if (preg_match('/senddate|pubdate|hot|click|lastpost|rand/', $orderby)) {
|
|
|
|
$query = "SELECT arc.*,tp.typedir,tp.typename,tp.isdefault,tp.defaultname,tp.namerule,tp.namerule2,tp.ispart,tp.moresite,tp.siteurl,tp.sitepath,mb.uname,mb.face,mb.userid $addField FROM `#@__archives` arc LEFT JOIN `#@__arctype` tp ON arc.typeid=tp.id LEFT JOIN `#@__member` mb ON arc.mid=mb.mid $addJoin WHERE {$this->addSql} $filtersql $ordersql LIMIT $limitstart,$row";
|
|
|
|
}
|
|
|
|
//普通情况先从arctiny表查出id,然后按di查询速度非常快
|
|
|
|