Page 1 of 1
FrontEndUsers module user page error
Posted: Fri May 08, 2009 5:56 am
by whisere
An error reported on the page:
ERROR: column "a.username" must appear in the GROUP BY clause or be used in an aggregate function
and thus the user list is not showing,
FrontEndUsers 1.6.4 on cmsms 1.5.4.
Re: FrontEndUsers module user page error
Posted: Fri May 08, 2009 7:53 am
by viebig
That's MYSQL compatibility/configuration problem.
I experienced that too.
This is always ok:
ie:
Code: Select all
SELECT COUNT(*) as count FROM table;
but if you add and extra field, it's illegal to not use a GROUP BY clause
ie:
Code: Select all
SELECT COUNT(*) as count, user FROM table
the correct would be
ie:
Code: Select all
SELECT COUNT(*) as count, user FROM table GROUP BY user
in my mysql-5.0.75-0ubuntu10 no errors are triggered when I use both.. but I had a problem with mediatemple that uses mysql-5.0.45 source
the correct would be adopting what mysql clains to be right, check this reference
http://dev.mysql.com/doc/refman/5.1/en/ ... -rows.html
Event that way, the need of a GROUP BY seens unnecessary, I have no clue what mysql team is up too.
You should report that to the developer of this module, and add my post as a reference, so they can do further investigations. Also, you can edit the module manually, find the query and modify it.
Regards
G
Re: FrontEndUsers module user page error
Posted: Mon May 11, 2009 1:09 am
by whisere
Thanks for the helps! I am actually using postgresql , but I think the problem is the same. I think I need to change the code, wondering if other frontend users have the same problems.
Re: FrontEndUsers module user page error
Posted: Mon May 11, 2009 2:26 am
by viebig
try to fix it and let us know..
Regards