Answer the question
In order to leave comments, you need to log in
How to save a list of people a user follows in a database?
How should the list of those people to whom the user is subscribed be stored?
Would it be correct to create, for example, in the users table (a table with all users and their data (login password, etc.)) the subscriptions parameter in which for each user to store an array consisting of the id of the users on which he is subscribed?
Here is the view of the table (I made a diagram in haste)
Answer the question
In order to leave comments, you need to log in
Wouldn't it be easier to create a separate table where to write user_id, subscribe_user_id and the subscription date?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question