user26087
user26087

Reputation: 839

MySQL function that alerts if a new row is inserted

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?

Upvotes: 0

Views: 356

Answers (3)

Hugues Van Landeghem
Hugues Van Landeghem

Reputation: 6808

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

Upvotes: 1

ninesided
ninesided

Reputation: 23273

The simplest but (arguably) the least elegant solution is to have your client simply poll the table for changes.

Upvotes: 0

Itay Moav -Malimovka
Itay Moav -Malimovka

Reputation: 53607

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).

Upvotes: 5

Related Questions