Is there a function in MySQL that we can use in a client application that will automatically sends alerts every time a new row is inserted in a table?
+5
A:
You will have to use/write a trigger, that will record the change in a specifically designed, just for this purpose, table, and a crone/what ever is used in MS environment to check this table every X seconds (you decide the X).
Or, write an extension to mysql...(Or pay one of the mysql developers to do it for you).
Itay Moav
2009-04-22 01:47:50
why not poll the table that is being inserted into?
ninesided
2009-04-22 02:14:44
Because doing things like this is the entire point of a trigger; usually, you want to use the tool designed specifically for the job.
kquinn
2009-04-22 02:18:30
A:
The simplest but (arguably) the least elegant solution is to have your client simply poll the table for changes.
ninesided
2009-04-22 02:13:44
A:
In some database (Interbase, Firebird, perhaps others...), your can trigger event. http://www.firebirdsql.org/doc/whitepapers/events_paper.pdf
I ask one day in MySQL forums about this : http://forums.mysql.com/read.php?84,3629,3629
Hugues Van Landeghem
2009-04-22 16:40:30