购物车结算报错的问题

购物车里的两件不同商品一起结算后报的错误:

 MySQL server error report:Array ( [0] => Array ( [message] => MySQL Query Error ) [1] => Array ( [sql] => SELECT *FROM `rishengxjd`.`ecs_favourable_activity` WHERE start_time <= '1420966015' AND end_time >= '1420966015' AND CONCAT(',', user_rank, ',') LIKE '%,2,%' AND act_type IN ('2','1') AND supplier_id= ) [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 '' at line 1 ) [3] => Array ( [errno] => 1064 ) )

1个回答

语法错我。把你上面的SQL语句格式化一下放到数据库服务器上执行一下,看看具体是哪个位置出错了。
首先,SELECT *FROM 中星号和From之间加个空格,即SELECT * FROM
其次, supplier_id=后面就没有值了吗?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐