On my gallery script I would like to restart hit counter after every month.
Gallery is based on PHP and SQL.
Any idea how?
You'll need to know the table and column names of the fields you're looking to dump or update.
Yes I know them:
table: mygallery_images
column: image_hits
Call this once a month via cron job -- you will need to add the connect code.
mysql_query("UPDATE mygallery_images SET image_hits='1'");
The problem is that my host provider doesn't allow cron jobs. 🙁
Then you'll need to add a field for the last date reset and use a conditional to check whether or not to run the query.
Kudose wrote:Then you'll need to add a field for the last date reset and use a conditional to check whether or not to run the query.
That is excatly what I would like to find out.
Thx!