The get tag works well and the get is almost universal after customizing the model. But Phpcms upgrade to V9, the 2008 of a lot of functions are removed, such as the get tag, in the back automatically added a limit 0, 20, so you even write the num= ' number ' is useless, written in SQL statements, such as
{pc:get sql= "select * from V9_news ORDER by ID DESC LIMIT 2,5" cache= "3600" page= "$page" dbsource= "Discuz" return= "Data"}
Will error, the printed SQL statement is:
SELECT * from V9_news ORDER by ID DESC limit 2,5 limit 0,20
This is obviously wrong. There are 2 methods, of which the second method is the most absolute, direct code:
1. For example,
{pc:get sql= "select Title,url from V9_news where catid=9 and status=99 order by updatetime Desc" start= "0" num= "4" return= "V"}
can be controlled by adding start and Num.
2. (The more absolute method)
{pc:get sql= "select Title,url from V9_news where catid=9 and status=99 order by updatetime desc limit 0,4--" return= "V"}
Note the two minus sign after 4, v9 the limit 0,20 statement to the comment!
PHPCMS v9 get label SQL statement solution for invalid limit problem