中文標簽實現總下載排行榜 日下載排行榜 周下載排行榜 月下載排行榜
新建標簽 通過自定義語句
總排行榜: (通過 phpcms_content_count 表中的hits字段進行降序 此字段是總的下載數 )
以下為引用的內容: SELECT a.contentid,a.catid,a.typeid,a.areaid,a.title,a.style,a.thumb,a.keywords,a.description,a.userid,a.updatetime,a.inputtime,a.url,a.listorder,b.hits FROM `phpcms_content` a,phpcms_content_count b WHERE a.contentid=b.contentid AND status=99 ".get_sql_catid(265)." ORDER BY b.hits DESC |
月下載排行榜 與上雷同 字段換成 hits_month(此字段是月下載數)
以下為引用的內容: SELECT a.contentid,a.catid,a.typeid,a.areaid,a.title,a.style,a.thumb,a.keywords,a.description,a.userid,a.updatetime,a.inputtime,a.url,a.listorder,b.hits_month FROM `phpcms_content` a,phpcms_content_count b WHERE a.contentid=b.contentid AND status=99 ".get_sql_catid(265)." ORDER BY b.hits_month DESC |
以下類推..見 phpcms_content_count表字段
上一篇 站長要注意審視自己的網站優化