Phpcms V9 News content sort the calling code by the number of comments in the list

Source: Internet
Author: User

Phpcms V9 The list of news lists by number of comments in the specified column

Call a list of news items sorted by number of comments under a specified column

{pc:get sql= "select * from phpcms_comment where Commentid like ' content_ specified column catid% ' ORDER BY total desc" rows= "9" return= "Data"} {loop $data $r} {str_cut ($r [title],60, ')} {/loop} {/PC}


Call a list of all the sub-columns under a given column and sort by the number of comments

{pc:get sql= "select * from Phpcms_comment where Commentid REGEXP CONCAT (' Content_ (') (select Group_concat (CATID separator ' | ') From phpcms_category where parentid= specified column of catid), '). ORDER BY total desc "rows=" 9 "return=" data "} {loop $data $r} {str_cut ($r [title],60, ')} {/loop} {/PC}


Phpcms V9 News content sort the calling code by the number of comments in the list

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.