前端 · 2012 年 6 月 21 日

phpcms v9中文章列表怎么按更新时间来排列

在网站中,我们经常有很多的文章没有被百度收录。
那最常用的一种办法就是重新修改这篇文章然后推荐到首页。
但是在phpcms v9中修改后的文章不会默认出现在首页,
那必须用到get标签……
列子:{get sql="select*from phpcms_content where catid>=79 and catid<=85 and status=99 and posids=1 and `thumb`!='' order by id desc" rows="1"}
其中order是排列方式;默认后面是id排序的;
我们可以把id改为updatetime这样:
{get sql="select*from phpcms_content where catid>=79 and catid<=85 and status=99 and posids=1 and `thumb`!='' order by updatetime desc" rows="1"}
这样只要我们修改过的文章就会出现在最新更新的文章列表了。