我正在使用MySQL 5.7.13在我的Windows PC上使用WAMP服务器
我的问题是在执行这个查询时
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 | status | createdon | updatedon | +----+---------+---------+---------+----------+-----------+------------+---------------+--------------+------------+--------+---------------------+---------------------+ | 1 | 1 | 78 | 1 | 21.1212 | 21.5454 | 1 | 1 | id_Card.docx | 0 | Active | 2017-01-27 11:30:11 | 2017-01-27 11:30:14 | +----+---------+---------+---------+----------+-----------+------------+---------------+--------------+------------+--------+---------------------+---------------------+
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号