Friends I have created a mysql table to get the page visits for my website.
My table is like this
statistics_table(stat_id,visited_page,visit_count)
Where the visit_count is incrementing by one for every visit.This works perfect. But now i need to to save all statistics in a different table each an every day to my traffic monitoring purpose.
like follows
2012/12/15-->page1-->100 visits
2012/12/16-->page1-->180 visits
2012/12/17-->page1-->200 visits
because statistics_table incrementing its value every day,so i can get how many visits per day using
(2012/12/16-->page1-->visits)-(2012/12/15-->page1-->visits)//80 visits
At the moment i am using an another table with same schema+date and update it everyday using cron job.
Is there any way to make this work rather than my way? I mean easy/better way to do this.Thanks for any advice.
You can use the following query statement to insert datas to another table,
Like this you can try,
This may helps you.