我用 ecshop 做二次开发的时候 商品 缺货 时,加入购物车出现报错。testshop是数据库名。大侠帮忙看一下
MySQLservererrorreport:Array([0]=>Array([message]=>MySQLQueryError)[1]=>Array([sql]=>...
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
`testshop`.`c_order_info` AS oi LEFT JOIN `testshop`.`c_users` AS u ON
oi.user_id = u.user_id, `testshop`.`c_order_goods` AS og WHERE
oi.order_id = og.order_id AND 1385542331 - oi.add_time < 2592000 AND
og.goods_id = ORDER BY oi.add_time DESC LIMIT 5
)
[2] => Array
(
[error] => You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'ORDER BY oi.add_time DESC LIMIT 5' at line 1
)
[3] => Array
(
[errno] => 1064
)
) 展开
(
[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
`testshop`.`c_order_info` AS oi LEFT JOIN `testshop`.`c_users` AS u ON
oi.user_id = u.user_id, `testshop`.`c_order_goods` AS og WHERE
oi.order_id = og.order_id AND 1385542331 - oi.add_time < 2592000 AND
og.goods_id = ORDER BY oi.add_time DESC LIMIT 5
)
[2] => Array
(
[error] => You have an error in your SQL syntax; check
the manual that corresponds to your MySQL server version for the right
syntax to use near 'ORDER BY oi.add_time DESC LIMIT 5' at line 1
)
[3] => Array
(
[errno] => 1064
)
) 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询