MyBB Community Forums

Full Version: [F] [PostgreSQL] Attachments Statistics in admin cp [C-Michael83]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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:

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 
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group