SELECT list is not in GROUP BY...sql_mode=only_full_group_by

Write about issues that you have found.

Moderators: Koduc, Xpycm

Forum rules
Pay attention! Forum is not a means for guaranteed support of clients and users. An answer as well as a quick answer is not supposed on the forum. We post messages as soon as possible.

The message limit on the forum is 3 messages per day.
If you want to say "thank you" then use the function "Give good reputation point", which is a green icon "plus" under the nickname of the person, who answered the message.

SELECT list is not in GROUP BY...sql_mode=only_full_group_by

Postby support » 16 Dec 2018, 10:31

After installing Open Real Estate you may encounter the following error:
CDbException: SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

Try to delete ONLY_FULL_GROUP_BY setting if you have access to mysql console
For example:
Code: Select all
mysql > SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); 



If you don't have access to mysql console:
open file protected\config\db.php and before the line:
Code: Select all
'class' => 'CDbConnection'

add:
Code: Select all
'initSQLs' => array("SET SESSION sql_mode='TRADITIONAL';"
Attachments
mysql_2.jpg
mysql_2.jpg (15.83 KiB) Viewed 365 times
mysql.jpg
mysql.jpg (19.83 KiB) Viewed 365 times
support
Citizen
Citizen
 
Posts: 113
Joined: 28 Dec 2011, 13:14
Reputation point: 0

Return to Issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron