php - How to trigger javascript on mysql update event -


i working on chat should display messages in real time.
messages stored in mysql-database.

every dataset has:

  • an auto-increment, unique id
  • name
  • text
  • timestamp

the chat works fine, @ moment trigger javascript function setinterval.
question: there way trigger function when there new set of data in database?

i @ using web sockets. see ratchet example of implementing. believe sample chat application.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -