PhpCms V9调用指定栏目子栏目文章的两种方法 第一种.直接写子栏目id ,用cat in {pc:get sql="SELECT * from v9_news where status=99 and catid in(21,22,23,24,25) order by id DESC" num="7" return="data"} {loop $data $r} {str_cut($r['title'],40)}({date('m-d',$r…
0:调用最新文章,带所在版块 {pc:get sql="SELECT a.title, a.catid, b.catid, b.catname, a.url as turl ,b.url as curl, a.id FROM `v9_news` a, `v9_category` b WHERE a.catid = b.catid ORDER BY `a`.`id` DESC " num="15" cache="300"}{loop $data $…
1.截取调用标题长度 {str_cut($r[title],36,'')} 2.格式化时间 调用格式化时间 2011-05-06 11:22:33 {date('Y-m-d H:i:s',$r[inputtime])} 3.多栏目调用&多推荐位调用 调用需求:文章范围为59 60 61三个栏目,并且推送到了27 和28两个推荐位:从第三条开始,连续调用7篇文章. {pc:get sql="SELECT * FROM v9_news WHERE id IN (SELECT id FROM…
新源网络工作室友情总结phpcms v9最常用的22个调用代码: 调用最新文章,带所在版块{pc:get sql="SELECT a.title, a.catid, b.catid, b.catname, a.url as turl ,b.url as curl,a.id FROM `v9_news` a, `v9_category` b WHERE a.catid = b.catid ORDER BY `a`.`id` DESC "num="15" cache=&…