1

How do I get a notification whenever there is a record in a particular table in the database?

  1. If I use a Trigger in MySQL will not work when I change database.

  2. If I make an Ajax request every certain interval, I will make unnecessary requests and I've been punished for it in Hostmonster (escape them).

  3. Another idea?

This guy went through the problem as me: http://www.schiffner.com/11-excruciating-months-with-hostmonster-have-come-to-an-end/

Thank you.

Oli Veira
  • 47
  • 5

1 Answers1

1

Sending Ajax requests at regular intervals (long polling) may not be the best solution but I have seen this implementation in many applications and probably it is easy to implement.

One of the solutions that has not been mentioned here is a PHP script running in a scheduler. This question will help you and make things clearer. Schedule alarm notification system php

Do let me know if you need more info.

Community
  • 1
  • 1
Talha Masood
  • 993
  • 1
  • 7
  • 22