Forum Moderators: coopster
I'm having trouble calculating the visits on my site.
Basicly, I want to get an output, displaying on the left the months, on the other the numbers of visits, example:
January - 800
February - 900
March - 1000
... etc
I have no idea how to the script to show all the months I have on my db, and calculate those visits.
Also, another thing I'd like to see, is when I click on that month, that it will show all dates of that month on the left, and visits on the right.. again .. no idea how to get that information ..
Hope someone will give me a hand, thanks
What is the structure of your database table(s)? Maybe you want to take a look at the following thread on extracting data from MySQL: [webmasterworld.com...]
MySQL Date and Time Functions [dev.mysql.com]
GROUP BY [dev.mysql.com]
COUNT [dev.mysql.com]
I might also look at having individual columns for year, month and day. That might allow for more complex grouping and sorting. Though I wouldn't jump into any db changes before you see if they are actually needed.