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.
database column activity script
Moderator: General Moderators
Re: database column activity script
Somehow you're keeping track of whether a message has been read yet or not, right? Probably a field in the table.
To find the number of unread messages, make a SELECT COUNT(*) query that only selects messages which are unread.
To show the message, well, you have to know which message to show. If you want the first unread message then make a query to select the earliest/latest unread message.
To find the number of unread messages, make a SELECT COUNT(*) query that only selects messages which are unread.
To show the message, well, you have to know which message to show. If you want the first unread message then make a query to select the earliest/latest unread message.
Re: database column activity script
hi tasairis, thanks for the direction...... I am trying to use a simple message system for the community website... a simple form that inserts messages into a databse column..... how do I single out unread mails from the inserted messages?
I have never done a messaging system before..... please assist.... thanks
I have never done a messaging system before..... please assist.... thanks