Jump to content

Read/Unread


Cless

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.