Jump to content

Show notifications for a user who is offline to other user?


wmguk

Recommended Posts

hey,

 

i have a table called notifications

 

Basically, a message is sent to andrew, however if andrew didnt log in I need all the users currently online to see that message...

 

I tried this

$time = time(); 
$day = date('j', $time);
$month = date('m', $time);

$todosql = "SELECT * FROM notifications, users WHERE users.username=notifications.touser AND notifications.touser='%' 
AND users.online='no' && (notifications.status='waiting' || notifications.status='Urgent') && MONTH(timedate)<='$month' && DAY(timedate)<='$day'";

 

All I'm trying to do is get it to say, is if the status is waiting or urgent, its not addressed to me, but it is due before today then display it.

But i get no results returned (even though checking the DB there are messages.)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.