More hands-on practice, you can also easily ride phpcms!

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

Today should be a friend to do the operation of the request to help modify the site, very simple: Home page Call the latest comment content and article links, with the Phpcms v9 the latest version of the program. We all know that the PHPCMS framework and ideas are good, but the details do not quite in place, many details are not considered. Friend put forward this feature the default program cannot implement the call. Know that I am the moderator of Phpcms, want me to help deal with, in fact, is not difficult, the most important is the brain, many practices, similar to a lot of problems can be very simple to solve, slightly understand programming can easily control the powerful phpcms, below and you share the process, give novice friends some inspiration.

First check the Phpcms V9 help manual, which is also a problem for many beginners-don't like reading manuals. This is a must to see, the foundation is not solid more advanced also do not good, step by step. Next we look at the field table. Get the following information:

V9_comment_data_1 table has a Comment content field, the V9_comment table has the article link field (URL), why do I choose these two tables? The program ape has begun to answer the quiz, and the two tables have the same field (Commentid), through which , we can associate two 6184.html ">" Data tables together to get the data we want.

The statement of the joint query believe that we have learned, here do not elaborate, do not understand the question Niang, the idea has, directly out of the query statement:

SELECT content, url from v9_comment_data_1,v9_comment where V9_comment_data_1.commentid=v9_comment.commentid order by V9_comment_data_1.content

If you are unsure, you can enter phpMyAdmin debugging, as shown in figure:

After debugging, you can use the Phpcms V9 powerful get tool to invoke the data. Put the get tag, the home page calls all the latest comments and articles link this requirement is realized.

{pc:get sql= ' select content, URL from bbscms.net_comment_data_1,bbscms.net_comment where bbscms.net_comment_data_1. Commentid=bbscms.net_comment.commentid ORDER BY bbscms.net_comment_data_1.content Desc "num=" 9 "return=" Data "}

{Loop $data $key $r}

{Str_cut ($r [content],40, ']}

{/loop}

{PC}

Phpcms call the latest article functions can also be in accordance with this idea of their own play, or that sentence, more hands-on practice, you can easily control phpcms! welcome Common Exchange PHPCMS Technical issues, I am the old snail, jar id:hgh0720, something to style template area called me. Welcome to my blog: http://www.laowoniu.cn.

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.