Run a SQL Query(count) every 30 sec, and then save the output to some file
I am developing a website and got a database where people can insert data(votes). I want to keep a counter in the header like "x" votes have been cast. But it is possible that there will be alot of traffic on the website soon. Now I can do it with the query(SELECT COUNT(*) FROM `tblvotes`) and then display number in the header, but then every time the users changes page, it will redo the querry, so I am thinking, mayby it is better to the querry once every 30 sec(so much less load on the mysql server) but then I need to save the output of it to some place.(this shoudn t be so hard I can write it to a textfile? But how can I let my website automaticly every 30 sec run the querry and put the number in the file. I got no SSH to the server so I can t crontab it?

If there is something you might not understand feel free to ask!

Greetings Maxim
Run a SQL Query(count) every 30 sec, and then save the output to some file
===

I am developing a website and got a database where people can insert data(votes). I want to keep a counter in the header like "x" votes have been cast. But it is possible that there will be alot of traffic on the website soon. Now I can do it with the query(SELECT COUNT(*) FROM `tblvotes`) and then display number in the header, but then every time the users changes page, it will redo the querry, so I am thinking, mayby it is better to the querry once every 30 sec(so much less load on the mysql server) but then I need to save the output of it to some place.(this shoudn t be so hard I can write it to a textfile? But how can I let my website automaticly every 30 sec run the querry and put the number in the file. I got no SSH to the server so I can t crontab it?

If there is something you might not understand feel free to ask!

Greetings Maxim