As aleroot noted, if you used MSSQL, then SqlDependency is exactly the answer you are looking for. But since you are using MySQL, we have few options.
The concept, known as WebSockets, was introduced in HTML 5. This is a type of PUSH technology. Although I'm not sure if it can be used in your script, go through the article available at: http://net.tutsplus.com/tutorials/javascript-ajax/start-using-html5-websockets-today/
The remaining option is to periodically query the database for any data changes. The following are some guidelines for reducing server load when using polling:
1) , ( ) .
2) , , . , , - .
.