开发者

Run script when someone inserts or updates a row in certain Table

I am using MYSQL under ubuntu. I want to run a certain program automatically when inserting or updating row in a certain table. The program is actually sending request t开发者_StackOverflow社区o a php on the same server. The php script is implemented and it notifies all clients that "data is updated, please get it". How can I do it?

Thank You


best solution is create cron job and use system command in cron file.


If you have control of the script, the easiest way would be to create your own query() method that wraps around whatever SQL query call you need to make. You can put something in there to see if there's an UPDATE/DELETE/INSERT and if so fire off your "data updated" notice.


Probably cannot be done without major security issues on mysql server.

you could to this from php. either execute the program when you send the query to mysql or create a cronjob

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜