phpcms v9 指定栏目下新闻列表按评论数排序的调用 

调用一个指定栏目下按评论数排序的新闻列表

1
2
3
4
5
{pc:get sql= "select * from phpcms_comment where commentid like 'content_指定栏目的catid%' order by total desc"  rows= "9"  return = "data"
{loop  $data  $r
{str_cut( $r [title],60, '' )} 
{/loop}  
{/pc}


调用一个指定栏目下所有子栏目的新闻列表,并按评论数排序

1
2
3
4
5
{pc:get sql= "select * from phpcms_comment where commentid REGEXP CONCAT('content_(',(select group_concat(catid separator '|') from phpcms_category where parentid=指定栏目的catid),').') order by total desc"  rows= "9"  return = "data" }  
{loop  $data  $r }  
{str_cut( $r [title],60, '' )} 
{/loop}  
{/pc}