I am trying to create a live orders page for my website. I need the page to auto-update to show that a new order has been placed and to display an alert/sound whenever a new order row is in the database.
Any ideas on how i can easily achieve this?
Thanks,
-AJay
You will need to use something like Comet to be able to push data to the client.
Then, use a MySQL trigger to somehow raise an event in your server application that’s holding the Comet connection open to push the appropriate data.
The less elegant way that many developers use (at least until WebSockets become popular) is to poll with AJAX for changes, but this has a high bandwidth overhead and a longer latency.