MYSQLからコピーしたSQLクエリがあり、引用符を削除しましたが、機能しないようです。
conn = connect();
selectStatement = "UPDATE student SET Item ? = ?, Type ? = ? WHERE ID = ?";
System.out.println(selectStatement);
if(conn != null)
{
preparedStatement = conn.prepareStatement(selectStatement);
preparedStatement.setString(2, id);
preparedStatement.setInt(1, location);
preparedStatement.setInt(3, location);
preparedStatement.setString(4, type);
preparedStatement.setString(5, userId);
preparedStatement.executeUpdate();
return true;
スローされた例外がこれであるため、なぜそれが機能しないのかわかりません
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:SQL構文にエラーがあります。MySQLサーバーのバージョンに対応するマニュアルで、「1=」の近くで使用する正しい構文を確認してください。1行目で「1=」「asd」「WHEREID=」「student1」と入力してください。