String name = request. getParameter ("name");
String queryString ="SELECT * FROM empy WHERE name LIKE '%'"+sname+"''";
我正在使用此查詢來搜索textfiled輸入的值。但它會顯示一條錯誤的短信..使用mysql從表中搜索項目like
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: 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 'textfiled value''' at line 1