[Pugged] Subject: Activity tracking, setting a "New" flag

ciapug@ciapug.org ciapug@ciapug.org
Fri, 10 Jan 2003 19:06:18 -0000


Chris Hettinger <chettinger@efr.org> said:

> If anyone can provide some input that would be helpful thanks.
>  
> PHP General Forum post @ Zend.com
> Subject: Activity tracking, setting a "New" flag 
> http://www.zend.com/phorum/read.php?num=3
<http://www.zend.com/phorum/read.php?num=3&id=22876&loc=0&thread=22876>
&id=22876&loc=0&thread=22876
>  

I think maybe you're really needing two things - a "new" check, and a
"seen" flag.

For instance, your email client may tell you that you have 4 new
emails when you log in. If you check email again, you then don't have
any new messages, but they're not marked as seen (or opened).

You can handle the "new" by checking how many messages were created
since your last view (which could be a session var or cookie). The
"seen" would have to be handled in a table - all you need is two
columns for user ID and message ID. You'll also want some housekeeping
routines that will delete orphans.

-dc