DEDECMS5.7会员空间文章分页总是显示"共 0 页/0条
今天发现会员中心里,查看用户全部文章时,列表分页始终显示“共 0 页/0条记录”,分页无法正常显示,于是从网上找了一下,终于解决,特将此方法分享给各位:
修正办法“
打开include/arc.memberlistview.class.php
查找
$countQuery = preg_replace("/select[ rnt](.*)[ rnt]from/i","Select count(*) as dd From",$this->sourceSql);
修改为
$countQuery = preg_replace("#SELECT[ rnt](.*)[ rnt]FROM#is", 'SELECT COUNT(*) AS dd FROM', $this->sourceSql);
$countQuery = preg_replace("#ORDER[ rnt]{1,}BY(.*)#is", '', $countQuery);
这样,分页就可以正常显示了,希望能对你有所帮助。
修正办法“
打开include/arc.memberlistview.class.php
查找
$countQuery = preg_replace("/select[ rnt](.*)[ rnt]from/i","Select count(*) as dd From",$this->sourceSql);
修改为
$countQuery = preg_replace("#SELECT[ rnt](.*)[ rnt]FROM#is", 'SELECT COUNT(*) AS dd FROM', $this->sourceSql);
$countQuery = preg_replace("#ORDER[ rnt]{1,}BY(.*)#is", '', $countQuery);
这样,分页就可以正常显示了,希望能对你有所帮助。
上一篇:关于DEDECMS文章标题存在字数限制,被自动截字的解 下一篇:Dedecms图集上传zip压缩包解压图片顺序不对问题的