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 '_utf8'???€??€???????' '%'' at line 1
弱水三千123456
浏览 2287回答 4
4回答
逆光之羽
sql.append(" and DESCRIPTION like '%' + ? + '%'");改成这样试试?
if (command!=null&&!"".equals(command.trim())) { sql.append(" and COMMAND=? "); paramerList.add(command); }准确的查询没问题,模糊查询就报错 if (description!=null&&!"".equals(description.trim())) { sql.append(" and DESCRIPTION like '%' ? '%'"); paramerList.add(description); }老师帮忙看一下,哪里出错了