弱水三千123456
2016-09-29 09:52:52
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
4 回答

大咪
TA貢獻785條經(jīng)驗 獲得超332個贊
你sql的語句是什么?就是對應(yīng)這句的sql
??sql.append("?and?DESCRIPTION?like?'%'???'%'");

大咪
TA貢獻785條經(jīng)驗 獲得超332個贊
.................能否把你的sql語句代碼貼出來啊,就這個句'_utf8'???€??€???????' '%''周圍的代碼截圖上來

弱水三千123456
TA貢獻1條經(jīng)驗 獲得超0個贊
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);
? ? ? ? ? ? }
老師幫忙看一下,哪里出錯了
添加回答
舉報
0/150
提交
取消