database error when using DISTINCT and ORDER BY |
guyz seems like you dont understand problem is with mysql version 5.7 needs change in code or change mysql 5.7 mode
by default in 5.7 one mode is set to ONLY_FULL_GROUP_BY either disable it or go back to old 5.6 mysql i fixed this problem by disabling only full group by now here is what is happening and how it can be fixed Code: SELECT message_user_name FROM cms_inbox GROUP BY message_user_id ORDER BY message_time DESC this code shows error in mysql 5.7 Code: Error Number: 1055 how to fix it simply go back to mysql 5.6 or disable ONLY_FULL_GROUP_BY mode seems like no one use group by regularly in codeigniter thats why no fixed querying in codeigniter which cause error in latest version of mysql 5.7 while works with every db before it thank you guys my problem solved by disable ONLY_FULL_GROUP_BY but hoping for future proof codeigniter team fixes this query by making it compatible with mysql 5.7 or giving lil info how to setup query to use it with newer mysql here is more info about this mode mysql 5.7 |
Messages In This Thread |
database error when using DISTINCT and ORDER BY - by corey - 05-04-2017, 11:36 PM
RE: database error when using DISTINCT and ORDER BY - by Rufnex - 05-05-2017, 01:42 AM
RE: database error when using DISTINCT and ORDER BY - by corey - 05-05-2017, 03:15 AM
RE: database error when using DISTINCT and ORDER BY - by corey - 05-05-2017, 10:06 PM
RE: database error when using DISTINCT and ORDER BY - by corey - 05-05-2017, 10:20 PM
RE: database error when using DISTINCT and ORDER BY - by Rufnex - 05-07-2017, 12:30 AM
RE: database error when using DISTINCT and ORDER BY - by corey - 05-09-2017, 08:35 PM
RE: database error when using DISTINCT and ORDER BY - by salain - 05-09-2017, 10:44 PM
|