Questions tagged «mysql-error-1055»

16
在MySql中执行查询时与only_full_group_by相关的错误
我已经升级了系统,并为正在使用的Web应用程序安装了带有PHP的MySql 5.7.9。我有一个动态创建的查询,当在旧版本的MySql中运行时,它运行良好。自升级到5.7以来,出现此错误: SELECT列表的表达式#1不在GROUP BY子句中,并且包含未聚合的列'support_desk.mod_users_groups.group_id',该列在功能上不依赖于GROUP BY子句中的列;这与sql_mode = only_full_group_by不兼容 请注意有关服务器SQL模式主题的Mysql 5.7手册页。 这是给我带来麻烦的查询: SELECT mod_users_groups.group_id AS 'value', group_name AS 'text' FROM mod_users_groups LEFT JOIN mod_users_data ON mod_users_groups.group_id = mod_users_data.group_id WHERE mod_users_groups.active = 1 AND mod_users_groups.department_id = 1 AND mod_users_groups.manage_work_orders = 1 AND group_name != 'root' AND group_name != 'superuser' GROUP BY group_name HAVING …

17
SELECT列表不在GROUP BY子句中,并且包含未聚合的列…与sql_mode = only_full_group_by不兼容
我在装有WAMP Server的Windows PC上使用MySQL 5.7.13 这是我的问题是执行此查询时 SELECT * FROM `tbl_customer_pod_uploads` WHERE `load_id` = '78' AND `status` = 'Active' GROUP BY `proof_type` 总是会出现这样的错误 SELECT列表的表达式#1不在GROUP BY子句中,并且包含未聚合的列'returntr_prod.tbl_customer_pod_uploads.id',该列在功能上不依赖于GROUP BY子句中的列;这与sql_mode = only_full_group_by不兼容 能否请您告诉我最好的解决方案... 我需要像这样的结果 +----+---------+---------+---------+----------+-----------+------------+---------------+--------------+------------+--------+---------------------+---------------------+ | id | user_id | load_id | bill_id | latitude | langitude | proof_type | document_type | file_name | is_private | …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.