换了模板,,想进入用户中心,,就成了乱码,,,怎么回来呢?

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

这不是乱码~是sql语句出现了问题

回答:
是否修改过程序
你的SQL明显有错误
SELECT u.user_name, og.goods_number, oi.add_time, IF(oi.order_status IN (2, 3, 4), 0, 1) AS order_status FROM `xmyiquan`.`ecs_order_info` AS oi LEFT JOIN `xmyiquan`.`ecs_users` AS u ON oi.user_id = u.user_id, `xmyiquan`.`ecs_order_goods` AS og WHERE oi.order_id = og.order_id AND 1282065197 - oi.add_time < 2592000 AND og.goods_id = ORDER BY oi.add_time DESC LIMIT 5

程序的不规范造成的。不是程序逻辑问题.注意变量加上''