A
A
andymitrich2013-07-06 13:40:01
PHP
andymitrich, 2013-07-06 13:40:01

Implementation Following?

Prompt how to implement the following'a mechanism with the notification on new records.
Interested in implementation details at the database level. I use MySQL, since there is no way to use a non-relational DBMS.
The snag arose due to the fact that a user who is subscribed, for example, to comments on a post, is shown a counter of new comments and it is not clear how to decrement or reset the value of this counter when viewing comments.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
robofox, 2013-07-06
@robofox

I can advise here that:
To make the table "user" - "record" - "last view time".
When the user enters the record, the current time is set.
To get the number of new comments, a query is made: "if the date of the comment is greater than the date of the last view." Etc.
The number of new comments from all entries is taken in the same way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question