|
|
|
|
![]() ![]() |
Jun 17 2005, 11:04 AM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 362 Joined: 2-March 05 From: The Netherlands Member No.: 4,097 |
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 |
|
|
|
Jun 17 2005, 08:57 PM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 362 Joined: 2-March 05 From: The Netherlands Member No.: 4,097 |
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 |
|
|
|
Jun 18 2005, 05:03 PM
Post
#3
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
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.
|
|
|
|
Jun 19 2005, 11:17 AM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 362 Joined: 2-March 05 From: The Netherlands Member No.: 4,097 |
Yea that could actually work just the way it should be, thanks!
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 30th August 2008 - 03:17 AM |