Error displayed on node:
* warning: pg_query() [function.pg-query]: Query failed: ERROR: column "dc.fid" must appear in the GROUP BY clause or be used in an aggregate function in /var/www/applications/partnerportal/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT dc.fid, f.filename, COUNT(dc.dcid) AS count, MAX(dc.timestamp) AS last FROM download_count dc JOIN files f ON dc.fid = f.fid WHERE dc.nid = 6 GROUP BY f.filename in /var/www/applications/partnerportal/sites/default/modules/download_count/download_count.module on line 89.
I'm not sure wether this error also occurs on MySQL installations.
Attached patch fixes this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| download-count.sql-error.patch | 2.13 KB | bob.huisman |
Comments
Comment #1
WorldFallz commentedI don't recall seeing this (and I'm using mysql) but I'll check it and see. I'll also test out the patch and make sure it doesn't make mysql throw a fit. If all goes well it will be in the next commit.
Comment #2
WorldFallz commentedhttp://drupal.org/cvs?commit=465464
Thanks!
Seems to test fine and it's a requirement in newer versions of mysql as well.
Comment #4
-Mania- commentedWhile the module works otherwise, I'm getting similar errors on the My Download Counts and Download Count pages:
My Download Counts
Download Count