smk smk - 2 years ago 285
SQL Question

MySQL listen notify equivalent

Is there an equivalent of PostgresQL's notify and listen in MySQL? Basically, I need to listen to triggers in my Java application server.

Answer Source

No, there aren't any built-in functions like these yet. You need to "ping" (every 1-5 seconds) database with selecting with premade flag like "read" 0/1. After

SELECT * FROM mytable WHERE read = 0

update it with read = 1

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download