占位符? 語(yǔ)法問(wèn)題
StringBuilder sql = new StringBuilder("select ID,COMMAND,DESCRIPTION,CONTENT from message where 1=1");
List<String> paramList = new ArrayList<String>();
if(command != null && !"".equals(command.trim())){
?sql.append(" and COMMAND=?");
?paramList.add(command); }?
?報(bào)錯(cuò):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?
寫(xiě)這個(gè)的時(shí)候報(bào)語(yǔ)法錯(cuò)誤,請(qǐng)問(wèn)要怎么改呢
2016-03-05
占位符沒(méi)賦值
ps.setString(i + 1, paramList.get(i));