ESSENCE IN THE NEXT ... There is a table. From it, according to certain criteria, data is sampled by a custom filter.
How to implement a functional, viewed / unread data Those that the user opened and viewed the rest (unvisited)
client part on JS - everything is clear ...
But as part of the database on the server ... Edit the main table with the data and assign viewing / non-viewing there, because the data is ONE FOR EVERYONE (that is, not as private messages), but the filter can be different
Ie it is necessary to create a separate table ...
I thought so, by default everything is considered unvisited.
Next we create a string, with the user ID, and the ID string of the sample and 0 or 1 - view / non-view ...
But then you get a lot of these lines (number of users X per number of lines)
I'm afraid that there will be a performance ...
Maybe you can make it easier?