| | 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 |
|
|
Hello?
Please, 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
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.
Yea that could actually work just the way it should be, thanks!
|
|
![]() Total New Messages - inbox.. |
| ADD REPLY / Got an Opinion! | Remove these ADs! | RAPID SEARCH! | Free Web Hosting | [X] |
|
Express your Opinions, Thoughts or Contribute more info. to help others. Ask your Doubts & Queries to get answers, So that "Together We can help others!" |
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP. | 500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE |
|