关于解决ecshop报错BIGINT UNSIGNED value is out of range in

2016-09-11 20:39 来源:www.chinab4c.com 作者:ecshop专家

 开源网店系统ecshop特别在外贸网站商城时候,出现ecshop报错如下:

MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [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 `yiwu86_beads86`.`ecs_order_info` AS oi LEFT JOIN `yiwu86_beads86`.`ecs_users` AS u ON oi.user_id = u.user_id, `yiwu86_beads86`.`ecs_order_goods` AS og WHERE oi.order_id = og.order_id AND 1349925442 - oi.add_time < 2592000 AND og.goods_id = 45880 ORDER BY oi.add_time DESC LIMIT 5 ) [2] => Array ( [error] => BIGINT UNSIGNED value is out of range in '(1349925442 - `xiaoyu_beads`.`oi`.`add_time`)' ) [3] => Array ( [errno] => 1690 ) )

 

这个问题是由于溢出得到一个负数,查了好久,原来是时间戳大了,就是时区设置错误了,最后在ecshop的data/config.php 那里调整一下时区为上海时区就行了 $timezone    = "Asia/Shanghai";