“用户订单内容”查找遇到的SQL语句问题

2016-07-07 15:05 来源:www.chinab4c.com 作者:ecshop专家

希望用户订单列表 的内容多点
修改了SQL如下
  1. SELECT order_id, order_sn, order_status, shipping_status, pay_status, add_time, (goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax - discount) AS total_fee FROM `shop8`.`ecs_order_info` WHERE user_id = '2' ORDER BY add_time DESC
复制代码

  1. SELECT order_id, order_sn, order_status, shipping_status, pay_status, add_time, address, consignee, tel, mobile,(goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax - discount) AS total_fee FROM `shop8`.`ecs_order_info` WHERE user_id = '2' ORDER BY add_time DESC
复制代码



添加了address, consignee, tel, mobile,这几个字段
但是查找结果却为零,如果增加这几个字段,去掉ORDER BY add_time DESC,能正常查找

求老鸟指教啊

回答:
论坛人气不高么没老鸟?

3# hz70ma
老鸟都去拿技术赚钱去