thinkphp Forum Post has a new reply after how to be top up?

Source: Internet
Author: User

For example, I have two tables. A T1 table is another T2 that is used to put the theme, and the ID of the T2 that is specifically used to put the reply content to the ID of the T1 to distinguish which subject's reply all the topics are sorted in descending order of time but the posts in the General Forum will be top up if there is a new reply. If I were to design a table like this, how can I get this new post to be topped up? If that's the case, it's $t1->order('time desc')->select() not going to work. So what should I do with a join or something like that, but it's not my design table unreasonable or how? I used the TP

Reply content:

For example, I have two tables. A T1 table is another T2 that is used to put the theme, and the ID of the T2 that is specifically used to put the reply content to the ID of the T1 to distinguish which subject's reply all the topics are sorted in descending order of time but the posts in the General Forum will be top up if there is a new reply. If I were to design a table like this, how can I get this new post to be topped up? If that's the case, it's $t1->order('time desc')->select() not going to work. So what should I do with a join or something like that, but it's not my design table unreasonable or how? I used the TP

T1 table and add a field last_reply_time represents the last reply time, and then insert T2 and update this field by passing

  • 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.