read-unread

Handling unread posts in PHP / MySQL

橙三吉。 提交于 2019-12-20 11:49:14
问题 For a personal project, I need to build a forum using PHP and MySQL. It is not possible for me to use an already-built forum package (such as phpBB). I'm currently working through the logic needed to build such an application, but it's been a long day and I'm struggling with the concept of handling unread posts for users. One solution I had was to have a separate table which essentially holds all post IDs and user IDs, to determine if they've been read: tbl_userReadPosts: user_id, post_id,

What's the most efficient way to remember read/unread status across multiple items?

感情迁移 提交于 2019-12-06 10:43:40
For example, let's take the format of a forum, where we have multiple users and multiple threads. Say this forum wants to track which users have read which threads and, say, use that information to mark which threads are unread when viewing the thread list. The only solution I can imagine is something that drops a record into the database each time a user visits a thread. I suppose there could be a 'mark all as read' button, which could employ a time stamp to help lessen the sprawl in the database... regardless this isn't a solution that impresses me. I have a feeling that I'm missing

Handling unread posts in PHP / MySQL

笑着哭i 提交于 2019-12-03 01:53:22
For a personal project, I need to build a forum using PHP and MySQL. It is not possible for me to use an already-built forum package (such as phpBB). I'm currently working through the logic needed to build such an application, but it's been a long day and I'm struggling with the concept of handling unread posts for users. One solution I had was to have a separate table which essentially holds all post IDs and user IDs, to determine if they've been read: tbl_userReadPosts: user_id, post_id, read_timestamp Obviously, if a user's ID appears in this table, we know they've read the post. This is