vonnero Posted February 27, 2009 Share Posted February 27, 2009 I have deleoped a cumminity website.... I am trying to create a script that will notify users as soon as they recieve a message and also show the number of messages unread. I am using mysql INSERT INTO to insert the message to the email table... I am not sure how to show users how many unread messages waiting for the... or how to show unread messages.... any assistance at this time will be a life saver.... or online tutorials.... Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/147109-database-column-activity-scriptneed-help/ Share on other sites More sharing options...
Obsession Posted February 27, 2009 Share Posted February 27, 2009 I have a rough idea what you mean, would help if you posted the code though. You could use mysql_num_rows when you select all of one persons unread mail, so they have 3 mail unread it'll return 3, then use that for the notification, say - $NumReturn=mysql_num_rows($QUERY); echo "You have "; echo $NumReturn; echo " unread messages!"; The query would be selecting all from table(table being a user's mail) where $SomeVariable=1 (1 being unread). I could be completely wrong, only started learning PHP/MySQL about a week ago, but I think that could work.. Quote Link to comment https://forums.phpfreaks.com/topic/147109-database-column-activity-scriptneed-help/#findComment-772588 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.