I am doing a restaurant aplication using php, mysql and js but I have a little problem.
When a client order somthing (using a tablet) I need a notification appears in another terminal but using the "easy way".
table orders:
id | id_place | id_meal | id_waiter | status
1 | 3 | 20 | 4 | 0
2 | 4 | 17 | 4 | 0
3 | 2 | 13 | 2 | 0
4 | 1 | 13 | 5 | 1 <-- All these are ordes
I am thinking to do update.php:
$que = mysql_query("SELECT id, id_waiter, status FROM ordes WHERE status = 0");
$notifi = mysql_fetch_array($que);
And I have all the orders in a standby state (status = 0) and Now I can show the results counting the rows for each waiter:
Waiter2 [1] //waiter2 has 1 notification
Waiter4 [2] //waiter4 has 2 notifications
But these results have to be constantly updated every 5 or 10 sec. How can I do that? I dont want to use jnode, sockets or semething like that.