I'm trying to check if my String key is in the NETFLIX column.
public boolean checkSerial(String key){
boolean isValid = false;
sql = "Select * from KEYS WHERE NETFLIX=?";
try{
ps = con.prepareStatement(sql);
ps.setString(1, key);
rs = ps.executeQuery();
if(rs.next())
isValid = true;
}catch(SQLException e){
System.out.println(e);
}
return isValid;
}
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'KEYS WHERE NETFLIX='IPMAN'' at line 1