Page 1 of 1

CDbCommand failed to execute SQL statement

PostPosted: 04 Aug 2018, 04:20
by qaona
*SCRATCH* The system was working okay, but the next day when I went to the adiminstration, the error appeared below.
Does that solve it? If you can, can you guide me how? The site is: http://telemacoimoveis.com.br/

  "CDbException
CDbCommand failed to execute SQL statement: SQLSTATE [42000]: Syntax error or access violation: 1055 The expression # 1 of the SELECT list is not in the GROUP BY clause and contains the non-aggregated column 'telemacoimoveisc_tbimoveis.t.id' that does not is functionally dependent on the columns in the GROUP BY clause; this is incompatible with sql_mode = only_full_group_by "


Best regards


Luiz Carlos

Re: CDbCommand failed to execute SQL statement

PostPosted: 04 Aug 2018, 21:59
by Xpycm
Hello.

You can try to disable the only_full_group_by setting by executing the following:

mysql> set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
mysql> set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';

https://www.google.com/search?q=GROUP+B ... y&ie=utf-8