HmmZ 0 Report post Posted June 17, 2005 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
HmmZ 0 Report post Posted June 17, 2005 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 Share this post Link to post Share on other sites
beeseven 0 Report post Posted June 18, 2005 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
HmmZ 0 Report post Posted June 19, 2005 Yea that could actually work just the way it should be, thanks! Share this post Link to post Share on other sites