How to Implement calendar sign-in javascript-PHP + JS

Source: Internet
Author: User
I wrote a calendar using js. How does php implement the sign-in records on the calendar and how does Mysql store the sign-in information? What should I do when I sign in to a php calendar?

I wrote a calendar using js. How does php implement the sign-in records on the calendar and how does Mysql store the sign-in information?

What should I do when I sign in to a php calendar?

Reply content:

I wrote a calendar using js. How does php implement the sign-in records on the calendar and how does Mysql store the sign-in information?

What should I do when I sign in to a php calendar?

Well, I have met this before.
The check-in table is huge.
If there are 10 users within 30 days of a month, there will be 300 records.
Data interaction is naturally ajax.
Another storage method is to throw it to mongodb.

Create a new sign-In table, store information such as the sign-in date, and then listen to the click events of each day in your calendar. Can I submit them through ajax? (the server time is used when saving)

Redis can be used for storage. A key: value key-value pair is created every month. For example, in the first month, sign: 111: 1 is used to indicate the user ID and sign-in month respectively, and then value is queue, end the data for each sign-in to the end of the queue. You can query the key of this month every time you need to display the sign-in table.

When you initialize the calendar, check whether you have signed in on the current day (compare the data in the database on the current day of the calendar). If you sign in on the current day, add Class indicates that you have already signed in! Otherwise, continue. How do you do it when initializing the calendar? You can paste 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.