Click to See Complete Forum and Search --> : Storing SQL table values after each day
KingCobra220
06-20-2007, 11:41 PM
At a certain time each day, everyday, I'd like to record the stats of two mysql tables. I'd like it to be done in a new table.
I have no idea how or where to start. I appreciate any help I can get.
Thanks,
-David
jasonahoule
06-20-2007, 11:45 PM
You can use cron to schedule a script to be run when you need it to.
KingCobra220
06-20-2007, 11:51 PM
Thanks for the quick answer. I started learning sql and php only a week ago. I have no idea how to use cron or what kind of script to write.
For clarity, I'm not making backups of the tables, just recording stats like the total number of registered users and other information.
Sorry for being so helpless. I'm sure I can figure a lot of stuff out myself if I were pointed in the right direction.
jasonahoule
06-20-2007, 11:54 PM
Cron is a unix scheduling utility. You should have this available through your hosting company. Just create the php page that you want to run as you usually would and have the cron schedule call this page. You may have to contact your hosting company for assistance if there is no way to do this in whatever administrative console they provide you.
KingCobra220
06-21-2007, 12:03 AM
Cron is a unix scheduling utility. You should have this available through your hosting company. Just create the php page that you want to run as you usually would and have the cron schedule call this page. You may have to contact your hosting company for assistance if there is no way to do this in whatever administrative console they provide you.
Excellent! I'll contact my hosting company in the morning. They do have cron, but I think I need to contact them to get it set up.