When I submitted the form to my JDBC connection page it gives an error. I submitted the form with a data like this
It's wrong
It gives an error as shown below
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 's wrong' IN BOOLEAN MODE) and bot2=1' at line 1
My code is
String Query="SELECT * FROM ques WHERE MATCH(subject) AGAINST('"+vv+"' IN BOOLEAN MODE) and bot2=1";
Class.forName("com.mysql.jdbc.Driver");
conn=DriverManager.getConnection("jdbc:mysql://localhost:3306 /wst","manohar","manohar");
stmt=conn.prepareStatement(Query);
rs=stmt.executeQuery(Query);
while(rs.next())
{
....
}