Phpcms V9 get Call label collation

Source: Internet
Author: User

Common PHPCMS Tag calls
1, call the system single data
(Call the information with ID 1, the title length of not more than 25 kanji, display the update date):
  • "SELECT * from Phpcms_content where contentid=1"/}
  • Title: {str_cut ($r [title],)} url:{$r [URL]}
  • Update Date: {date (' y-m-d ', $r [UpdateTime])}


2, call the system more than one data
(Call column ID 1 through the audit of 10 information, the title length of not more than 25 kanji, display update date):
  • "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="}
  • ' y-m-d ', $r [UpdateTime])}
  • {/get}


3, with paging
(Call column ID 1 through the audit of 10 information, title length of not more than 25 kanji, display update date, with pagination):
  • "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="ten" page="$page"} /c2>
  • ' y-m-d ', $r [UpdateTime])}
  • {/get}
Paging: {$pages}

4. Custom return variables
(Call column ID 1 through the audit of 10 information, the title length of not more than 25 Chinese characters, display the update date, the return variable is $v):
  • "SELECT * from Phpcms_content where catid=1 and status=99 order by updatetime Desc" rows="ten" return="V"}
  • ' y-m-d ', $v [UpdateTime])}
  • {/get}


5. Call other databases under the same account
(Call database for BBS, category ID 1 of the 10 latest theme, the theme length of not more than 25 kanji, display the update date):
  • "BBS" sql="select * from Cdb_threads where fid=1 order by dateline Desc" rows="}
  • bbs.phpcms.cn/viewthread.php?tid={$r [tid]} Update Date: {date (' y-m-d ', $r [Dateline])}
  • {/get}


6. Calling external Data
(Call the data source for BBS, category ID 1 of the 10 latest topics, the theme length of not more than 25 kanji, display the updated date):
  • "BBS" sql="select * from Cdb_threads where fid=1 order by dateline Desc" rows="}
  • bbs.phpcms.cn/viewthread.php?tid={$r [tid]} Update Date: {date (' y-m-d ', $r [Dateline])}
  • {/get}
phpcms V9 Get tags various call code brocade set

Original title: Phpcms v9 Get Call label collation

Original address: http://www.abcde.cn/info/show-23-885-1.html

copyright network times All, reprint please indicate the source

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.