Answer the question
In order to leave comments, you need to log in
How to make subscriptions and subscribers?
Hello.
In general, I decided to build a service for photographers, like anyone can go to the service and create their own page, like a photo of a social network. The site is made, there is still not enough knowledge for further) I want to ask how to implement a system of subscriptions and subscribers as in instagram?
Answer the question
In order to leave comments, you need to log in
The only thing that comes to mind so far is the user mapping table. The table has the following columns: UserID (user), UserFollowID (user subscribed by UserID). Fill in the table like this:
UserID -> UserFollowID
1 -> 45
1 -> 67
1 -> 2
etc. SELECT UserFollowID FROM FollowMapping WHERE UserID = 1
Or to reveal some connections among subscriptions. For example, get subscribers of a certain userSELECT UserID FROM FollowMapping WHERE UserFollowID = 1
Use different query options to get data according to your needs. Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question