14-1财务流水报错,500,求解!!

来源:14-1 订单列表 + 财务列表 + 订单详情 和 确认发货 功能

慕容0105032

2020-02-12

按照老师的一步步走到财务管理,其中的财务流水,报错!官方原码一字未动过,另外mysql版本5.7.28
图片描述
图片描述
sqlalchemy.exc.OperationalError
sqlalchemy.exc.OperationalError: (MySQLdb._exceptions.OperationalError) (1140, “In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column ‘food_db.pay_order.id’; this is incompatible with sql_mode=only_full_group_by”)
[SQL: SELECT pay_order.id AS pay_order_id, pay_order.order_sn AS pay_order_order_sn, pay_order.member_id AS pay_order_member_id, pay_order.total_price AS pay_order_total_price, pay_order.yun_price AS pay_order_yun_price, pay_order.pay_price AS pay_order_pay_price, pay_order.pay_sn AS pay_order_pay_sn, pay_order.prepay_id AS pay_order_prepay_id, pay_order.note AS pay_order_note, pay_order.status AS pay_order_status, pay_order.express_status AS pay_order_express_status, pay_order.express_address_id AS pay_order_express_address_id, pay_order.express_info AS pay_order_express_info, pay_order.comment_status AS pay_order_comment_status, pay_order.pay_time AS pay_order_pay_time, pay_order.updated_time AS pay_order_updated_time, pay_order.created_time AS pay_order_created_time, sum(pay_order.total_price) AS total
FROM pay_order
WHERE pay_order.status = %s
LIMIT %s]
[parameters: (1, 1)]
(Background on this error at: http://sqlalche.me/e/e3q8)

写回答

1回答

编程浪子

2020-02-12

0
1
慕容0105032
非常感谢!回复够快、够给力!
2020-02-12
共1条回复

Python Flask构建微信小程序订餐系统(可用于毕设)

微信小程序 + Python Flask 打造订餐系统全栈应用,可用于毕设。

1709 学习 · 1889 问题

查看课程