This would be a task for a cron job.
MySQL has date/time functions, so you could write a trigger which checks and updates a time value on every operation (update,insert,delete), but it would not do anything without such an operation.
You could also code something like
select unix_timestamp('2012-01-01') - unix_timestamp(now()) as countdown;
Ok, let me answer: the server load will be 20.000 pages per second. And with a 5 kb page it will be 100.000 kb per second.
Is this much or not? It all depends how the pages are constructed and delivered. Can you use a cache? Can you use the MySQL cache for repeated queries? And so on.
Apart from that, it seems to me like a silly idea to have a database pose as a countdown timer. Maybe you'd better tell us more about your problem, because this thread here gets somewhat misleading.
Ya this is irelivent now.
i came out really stupid.
i wanted to save a number of seconed left for a count down time and decrease it every seconed.
then i realised its a "silly idea" and just saved a timestamp and at the countdown i only compare the time at the moment with the time set in the timestamp and show the time left.
thanks for your help though!
If you're in one of those predicaments where cls.__private attributes just aren't enough since they can easily be accessed through inst._cls__private, and you need something a little more secure, here's ...