Mysqli prepare error


#1

Hi,

In the Visitors in Real-time panel on the Dashboard I’m getting the message:
Mysqli prepare error: ‘sub.idsite’ isn’t in GROUP BY

This is a clean installation on an Ubuntu 12.04 server running PHP 5.4.23 & MySQL 5.5.35

Any suggestions what could be causing this or what I can do to diagnore the problem?

Thanks,
Richard.


#2

OK - here’s the solution in case anyone else runs into this problem:

In the MySQL configuration file my.cnf
the following line:

sql-mode = ONLY_FULL_GROUP_BY

was causing the problem.

From the manual
http://dev.mysql.com/doc/refman/5.5/en/server-sql-mode.html#sqlmode_only_full_group_by

Do not permit queries for which the select list or or HAVING list refers to nonaggregated columns that are not named in the GROUP BY clause.

I guess there’s room for a little SQL improvement in the system.


(Matthieu Aubry) #3

Which Piwik version are you using?