nitiphone2021 Posted January 20, 2022 Share Posted January 20, 2022 (edited) hi all, as I reinstall old project for my customer and the service is working fine but I found sometimes it can't query some information. from checking it's because @@Global.sql_mode and @@SESSION.sql_mode set to "ONLY_FULL_GROUP_BY" the step to solve it need to run command SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); So any way can I make it not change the mode? Edited January 20, 2022 by nitiphone2021 Quote Link to comment Share on other sites More sharing options...
requinix Posted January 20, 2022 Share Posted January 20, 2022 Fix your queries so that you don't try to include columns in the SELECT if you aren't GROUPing BY them. SELECT a, b FROM foo GROUP BY a /* bad because "b" is not being grouped by */ How you fix a query depends on what it needs to do... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.