数据库查询语句报错了,不知道是哪个部分错了
代码片:
con = DBUtil.getConnection();
System.out.println("select * from group where member like '%"+email+"%'");
System.out.println("select * from group where member = "+email+"");
pst = con.prepareStatement("select * from group where member like '%"+email+"%'");
ResultSet rs = pst.executeQuery();
控制台报错信息:
select * from group where member like '%989@qq.com%'
select * from group where member = 989@qq.com
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 'group where member like '%989@qq.com%'' at line 1