For example, we have an AJAX submitted check-in, when the user submits the request, the PHP code in general to determine whether the user has been checked in today, if not signed, then sign in, increase the amount.
But there are individual users through the fiddle brush check-in, you can check in multiple times. How can i solve it?
I've done token verification, limit_req_zone in Nginx configuration, and so on, but it doesn't work.
Reply content:
For example, we have an AJAX submitted check-in, when the user submits the request, the PHP code in general to determine whether the user has been checked in today, if not signed, then sign in, increase the amount.
But there are individual users through the fiddle brush check-in, you can check in multiple times. How can i solve it?
I've done token verification, limit_req_zone in Nginx configuration, and so on, but it doesn't work.
Database transactions
Begin
Registration Data Write
Determine if (the database has been written to the check-in data) SELECT ID from table_name where *
Rollback
Else
Commit
Return sign-in success