How does the Javascript-php+js calendar sign-in come true

Source: Internet
Author: User

Using JS to write a calendar, how to implement the PHP calendar on the check-in record and MySQL How to store these registration information?

What do I do with the PHP calendar sign in?

Reply content:

Using JS to write a calendar, how to implement the PHP calendar on the check-in record and MySQL How to store these registration information?

What do I do with the PHP calendar sign in?

Well, this, I've met before.
The sign-in table will be very large.
If one months, 30 days, 10 users, then there will be 300 records.
Data interaction, the natural is Ajax.
Another way to store it is to throw it into MongoDB.

Create a check-in table, store the check-in date and other information, and then listen to your calendar every day of the Click event, through the AJAX submission is not OK (use server-side time when saving)

可以用redis来存,每一个月建一个key:value的键值对,比如第一个月就用sign:111:1,分别表示用户id和签到月份,然后value用队列,将每次签到的数据尾插到队列末尾,每次需要显示签到表的时候去查询这个本月的key就可以了。

When initializing the calendar, determine whether the day has been checked in (Calendar day compared to the data in the database), assuming the same day check-in, add class to indicate that has been signed! otherwise continue. What you do when you initialize your calendar, maybe you can post it.

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