I've noticed a couple of errors in trying to set up this module:

1. I had to manually create the db table 'file_downloads' for MySQL.
2. Still getting errors in syntax:

You have an error in your SQL syntax near 'ON f.filepath = CONCAT('files/', fd.filename) JOIN node n ON n.nid = f.nid ORDER' at line 1 query: SELECT fd.filename, fd.count, fd.timestamp, f.nid, n.type FROM file_downloads fd JOIN files f ON f.filepath = CONCAT('files/', fd.filename) JOIN node n ON n.nid = f.nid ORDER BY count DESC in /home/virtual/site331/fst/var/www/html/cms/includes/database.mysql.inc on line 121.

I have my dl settings to Private and the directory 'files' is there so not sure of the issue.

Comments

deekayen’s picture

I tried to reproduce this, but was unable to. It might be a variation in DB versions since count is a reserved word in some cases (apparently not in MySQL 5, which is what I tested on). Timestamp appears to be explicitly allowed without backticks according to http://dev.mysql.com/doc/refman/4.1/en/reserved-words.html.

Chill35’s picture

Priority: Normal » Minor
Status: Active » Closed (won't fix)

Unable to reproduce.

kabaldan’s picture

Same errors here.
Running MySQL 3.23.49.
With MySQL 3.23, you need to use INNER JOIN instead of JOIN.
I've fixed it by adding INNER before each JOIN statement in download_count.module file.