Jump to content

Recommended Posts

Is this short term or long term?

 

If it's the former, you could just save the ID's in a session.

 

If the latter, you'd have to have a table for storing usernames and topic ID's. Then query the database to see if the username and ID exist, if so, the user has read the topic.

 

That's hwo I'd do it anyway.

Link to comment
https://forums.phpfreaks.com/topic/159419-readunread/#findComment-840944
Share on other sites

it shouldn't cause any lag, pull the data like you'd usually do.. and then

assuming in the field the ids would be seperated by commas, e.g.

1,17,23,30,20,10

if (in_array($this_user_id,explode(',',$row['viewed_by_id']))) {

  // user has viewed this topic

}

Link to comment
https://forums.phpfreaks.com/topic/159419-readunread/#findComment-840951
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.