SQL access to Download Statistics

Permalink
Hey all!

Where do I find the file download statistics in our site's MySQL database? We did a standard installation and did not customize anything in the database.

When I go to the C5 File Manager and check the properties on a file, I can see the download statistics there (username and time stamp). I'm assuming C5 pulls that data from the site's MySQL DB. I want to have one of our developers create a quick and dirty daily report to run automatically on that information. Where do I find it?

Thanks!

 
Remo replied on at Permalink Reply
Remo
Have a look at this tutorial:
http://www.codeblog.ch/2011/06/concrete5-ajax-add-on-to-display-fil...

It's not a feature complete thing, but it should be a good start to get all the information you need!
admin replied on at Permalink Reply
Thanks Remo, but I'm really not looking to build something inside Concrete5. I just want to know wher in the DB C5 gets the download statistics.

I'm not a developer so I don't understand a lot of what was on the page you linked above and perhaps I'm missing it. Is there information on that page about where in the DB C5 gets the download statistics?

Thanks again!
Remo replied on at Permalink Best Answer Reply
Remo
Yes, you can find that information in the article as well:

SELECT fv.fvFilename Filename,count(*) Download_Count
         FROM DownloadStatistics ds INNER JOIN FileVersions fv ON ds.fID=fv.fID AND ds.fvID=fv.fvID
         WHERE YEARWEEK(timestamp) = YEARWEEK(CURRENT_DATE) 
         GROUP BY fv.fID, fv.fvID, fv.fvFilename
         ORDER BY count(*) DESC


The table "DownloadStatistics" what you basically need..