前端 · 2012 年 6 月 21 日

phpcms v9调用的相关文章默认为升序的解决办法

找到根目录下\phpcms\modules\content\classes\content_tag.class.php文件第123行;
将 .$r = $this->db->select($sql2, '*', $limit, '','','id');
改成$r = $this->db->select($sql2, '*', $limit, $order,'','id');
然后再调用页面就可以使用order排序了,如:
{pc:content action="relation" relation="$relation" id="$id" catid="$catid" num="5" order="updatetime DESC" keywords="$rs[keywords]"}