Reputation: 1257
How can i run a script as soon as mysql database is updated. I have a script in test.php, and i want to run every time, i get sms into (or entry u can say) my database example if massage is received at 10:20:56 sec script should run at 10:20:57 sec.. any thing will do like cronjob java php .any script
Upvotes: 1
Views: 3085
Reputation: 6499
If value is inserted via your code you can just add call of script just after insert. If it is inserted in code, that is not managed by you, than you should poll your database every N seconds and check for new records and call your php script.
Upvotes: 0
Reputation: 4693
You could try to create ON UPDATE
trigger and try to invoke PHP script. Here is more about that.
Upvotes: 1