2008-12-07, 08:15 PM
On the 'Attachments Statistics' page in the admin cp an error is returned, when a forum is using PostgreSQL.
Reproduce Steps:
1. Login to the admin cp
2. Go to Forums & Posts > Attachments > Attachments Statistics
The following error is returned:
Reproduce Steps:
1. Login to the admin cp
2. Go to Forums & Posts > Attachments > Attachments Statistics
The following error is returned:
MyBB has experienced an internal SQL error and cannot continue.
SQL Error:
42803 - ERROR: column "a.aid" must appear in the GROUP BY clause or be used in an aggregate function
Query:
SELECT a.*, u.uid as useruid, u.username, SUM(a.filesize) as totalsize FROM trunk_attachments a LEFT JOIN trunk_users u ON (u.uid=a.uid) GROUP BY a.uid ORDER BY totalsize DESC LIMIT 5