Phpcms invoking the specified article method

Source: Internet
Author: User

One, use get call phpcms V9 Specify ID page data method


{pc:get sql= "select * from Cmsyou_news WHERE id= '" cache= "3600" return= "Data"}
{Loop $data $val}
{$val [content]}
{/loop}
{/PC}


Two: call directly using get Tags:

{php $j = $catid;}
{pc:get sql= "select ' d '. ' Content ' from ' aspku_news_data ' as ' d ' left join ' aspku_position_data ' as ' P ' in ' d '. ' id ' = ' P '. ' ID ' Where ' P '. ' Posid ' = ' + ' and ' P '. ' CatID ' = ' $j ' ORDER by ' d '. ' ID ' desc ' num= ' 10 '}
{Loop $data $r}
{$r [content]}
{/loop}
{/PC}

In this way, you need to be careful to modify the name of the data table, the ID of the call, and the number num parameters.

Three: apply the Get tag in the recommended bit data:

{pc:content action= "position" posid= "+" catid= "the" order= "Listorder DESC" num= "1"}
{Loop $data $r}
<?php $id = $r [' id '];
$sql = "Select ' content ' from ' aspku_news_data ' WHERE ' id ' = ' $id ' LIMIT 0, 1";
$query = mysql_query ($sql);
while ($row =mysql_fetch_array ($query)) {
echo $row [content];
}
?>
{/loop}
{/PC}

This way can control the recommendation bit information in the background, more flexible, need to register is: need to add moreinfo= "1", the contents page of the schedule is transferred out.

Phpcms invoking the specified article method

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.