Jump to content
xisto Community
Sign in to follow this  
HmmZ

Total New Messages inbox..

Recommended Posts

i need a line of php for picking out the new messages a user has received since his last visit, i got a $userlastvisit variable wich is updated once the user logs in, but i can't figure out the line i need for $msgnew.Any help appreciated

Share this post


Link to post
Share on other sites

Hello?:PPlease, i need to know and i can't figure it out.I thought of one thing, but it would require yet another field in my userstable :X$qry=mysql_query("SELECT messages where username='$user' and savetime='$userlastvisit'");but i don't think that works....aaaaaaarggh, please help :P

Share this post


Link to post
Share on other sites

What I would do is to have a field in the table for the messages that says if it has been read or not (like a boolean field), and then when the user reads the message it would update the table and change it to read. Then you could have it count the number of messages that haven't been read that way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | 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.