0

I have a mySQL database in the server, I maintain a value for all items. The database is constantly updated by a independent server. When the values exceeds certain range, I want to send message to my android device through Google cloud Messaging.

I don't know how to trigger an event when the value exceeds certain range. I thought of using a trigger to send request to GCM server, but that looks bad option making a SQL database do non-SQL things.

Which is the efficient method to call an API on a particular event in the database. Any pointers would be greatly appreciated.

cyn0
  • 522
  • 2
  • 7
  • 23
  • not sure I see what's wrong with a trigger... – RobP Apr 13 '14 at 05:24
  • @RobP Is triggers the only option? – cyn0 Apr 13 '14 at 05:27
  • if you don't want the overhead and delay of polling, I'm not aware of anything else but perhaps someone in the community is. I just don't see why they are NOT an appropriate mechanism.See http://stackoverflow.com/questions/1467369/invoking-a-php-script-from-a-mysql-trigger – RobP Apr 13 '14 at 05:30

0 Answers0