Channel Total Ranking Call method
<div class= "box" >
Channel Monthly ranking Call method
<div class= "box" >
Method of calling all articles of the station:
<div class= "Idxtopapps contents" ><ul class= "Indexicns" >{pc:get sql= "select A.id,a.url,a.thumb,a.status, B.hitsid,b.views from V9_download A, v9_hits b WHERE a.status=99 and a.id=substring (b.hitsid,5) ORDER by b.views DESC "num = "6"}{loop $data $r}<li><a href= "{$r [' url ']}" ></a></li>{/ Loop}{/pc}</ul></div>
You can see "substring (b.hitsid,5)" is the Intercept hitsid field, from left to right number 5th string, namely "c-2-5" from left to right number, 1 "C", 1 "2", 2 "-", 5th character is "5", after interception only left 2nd "-" After the ID, the purpose of the final extract ID is reached. Of course, I also added another condition "status=99", this means that has been approved by the article, this dispensable.
Phpcms V9 Call article by number of views