I have a desktop application inserting values into a mysql table with fields id
, keyword
and timestamp
I have a php page which is kept open in my browser and lists all entries from that database.
What I want to do is to have this page automatically check if there's a new entry in the database and warn me. This warning must be a sound.
I consider an entry to be new if it's timestamp is less than 60 seconds the current timestamp.
So, I have the mysql query which does check for new entries, but my main question is, how to perform that query every 1 second without manually refreshing the page? And how to play a sound alarm when a new entry is found?
Thanks in advance.