Every added fan of php followers will have a prompt. This post was last edited by u012376806 at 19:17:32 on.
Currently, the following is a separate table structure:
Gzid userid followuserid remark in_time
Gzid auto-increment
Userid: User id
Followuserid: id of the person to be followed
Remark remarks
In_time follow time
How can I add n followers after being followed?
There is also how to prevent users from constantly paying attention to and canceling a user's attention.
Reply to discussion (solution)
1. after being followed, the system prompts the host? Difference between new data and data output in a certain period of time
2. determine whether the operation is permitted by the timestamp within a period of time
Make a judgment before following and canceling the follow.
1. after being followed, the system prompts the host? Difference between new data and data output in a certain period of time
2. determine whether the operation is permitted by the timestamp within a period of time
How do I write a query statement for mysql to query data 30 minutes ago? unix timestamp
Query the number of fans whose current id is 1
Select count (*) as totalb from pd_attentions where followuserid = '1'
Query the number of followers whose id is 1 30 minutes ago
Select count (*) as totalb from pd_attentions where followuserid = '1' in_time
Select count (*) as totalb from pd_attentions where followuserid = '1' and in_time <DATE_SUB (CURDATE (), INTERVAL 30 SECOND)