smk smk - 9 months ago 197
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.


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