Phpcms v9 Data source

Source: Internet
Author: User

Find the data source under the module in the PHPCMS background first

There are two ways of data sources

1, internal data source

2, external data source

Only external data sources are done here. Add an external data source

1) must fill in the database link information, specify a data name (within the station call is used)

2) go to "tags", click on the Label Wizard, add a label to fill out the SQL statement to generate the following calling code

{pc:get sql= "select * from CDs" cache= "3600" page= "$page" dbsource= "dd" return= "Data"}
{Loop $data $n $r}
<li><a href= "{$r [' url ']}" title= "{$r [' title ']}" >{$r [' title ']}</a></li>
{/loop}
{/PC}

Cache Caching Time

page Specifies paging

Bsource Data Source Name

Return data

I have a few times the generated code contains spaces resulting in an error in the call, so here's the question of whitespace behind Dbsource

Phpcms v9 Data 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.