I have two questions.
I am working on a php/mysql driven website. It allows users to make posts and other users to comment on them.
I am currently working on a notification system where
the user will be notified whenever somebody makes a post.
if the user has commented on a post, the user will be notified of further new comments.
My current method is a subscription based structure, where when somebody makes a comment or post, their user_id and post_id will be inserted into a subscribed' table. Is this an efficient method?
how can I stop a duplicate row entry?
e.g if the table data is:
It won't duplicate another entry of John, 102.