CDbCommand failed to execute SQL statement

Questions and answers about change of functions, design, hosting etc.

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.

CDbCommand failed to execute SQL statement

Postby qaona » 04 Aug 2018, 04:20

*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
qaona
Stranger
 
Posts: 24
Joined: 06 Jun 2013, 05:10
Reputation point: 0

Re: CDbCommand failed to execute SQL statement

Postby Xpycm » 04 Aug 2018, 21:59

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
Dropbox
Open Real Estate CMS: FAQ | FAQ 2 | FAQ 3
Image
Xpycm
Web Developer
Web Developer
 
Posts: 281
Joined: 30 Dec 2011, 11:06
Reputation point: 2


Return to Questions and help for changes

Who is online

Users browsing this forum: No registered users and 12 guests

cron