Sky灬Thunder 2015-11-20 06:03 采纳率: 50%
浏览 1792
已采纳

mybatis的sql语句,求解答

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 'a where a.store_id= ''' at line 1,一直找不到id图片说明这个是其中文件图片说明删除语句
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 'store_id='3'' at line 20

  • 写回答

5条回答 默认 最新

  • 关注

    楼上说的没错,你没有在方法配置里面加上参数的类型,没法识别你传回来的id
    下面是我之前写的一个例子

    delete from T_PROJ_HOLIDAY where id in (${id})

    ${id}里面是我的实体类ProjectHoliday的一个叫id的属性,而像你这样的写法的话,应该写上parameterType="java.lang.String",然后应该就能够识别你的#{id}了

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(4条)

报告相同问题?