monitor changes in mysql table and respond accordingly
I want to know how to monitor a particular mysql table for changes. Suppose there is an insert comman开发者_Python百科d and I want to get the values of all the columns corresponding to that insert command and then use those values to do something.
An insert trigger will handle detecting the insert for you:
CREATE TRIGGER my_on_before_trigger BEFORE INSERT ON the_table_you_want_to_monitor
...
精彩评论