I'm new in Prepared Statements, not sure if what I'm trying to do is legal or not.
String updatequery = "Update articles SET Title = ? WHERE id IN ?";
try{
prestatement = connect.prepareStatement(updatequery);
prestatement.setString(1, "Test");
prestatement.setString(2,"(4,5,6)");
I get the following error:
Error: 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 ''(4,5,6)'' at line 1
It seems like the setString() method is adding quotes to the query, is there a way to avoid this or another method to use to accomplish what I'm trying to do ?