query help

wxdqz

New Member
I am developing a web base driven site with a backend to a database, MySQL. When a manager makes a new entry in the database, one minute later a message will pop-up on the affected area workstation. There are five areas: north, south, east, west, and central. I can ge a message to pop-up on the affected area(s) workstation, but I cannot stop the message from displaying every 60 seconds. I just want the message to display once. What I am having trouble with is writing a query statement thatl will select data from a table based on the current date and if the current time is greater than the new entry time + 1 minute.

$query="SELECT north, south, east, west, central FROM traffic_area WHERE (TIME_FORMAT(CURTIME(), '%H %i') > TIME_FORMAT(time_entered, '%H %i+1)) and (CURDATE()=date_entered);

I have tried different formats and nothing seems to work.
 
Back
Top