I'm creating a Quiz. I was able to create the screen to create the questions, it is recording in the database all right. But now I'm going to do the "game" itself, so I would have to get a question that is stored in the bank and return to the screen, how do I do this query in the bank? ResultSet
is giving the error code below.
String SQL = "Aqui montaria o SQL de Busca de Dificuldades no jogo
WHERE" ;
String Nivel=" ";
if(JrbFácil.isSelected()){
SQL += "DICICULDADE = FACIL"
}
if(JrbMédio.isSelected()){
SQL += "DICICULDADE = MEDIO"
}
if(JrbDificil.isSelected()){
SQL += "DICICULDADE = DIFICIL"
}
PreparedStatement stmt = this.connection.prepareStatement("select *from quiz where id = ?");
stmt.setInt(1, 1);
ResultSet rs = stmt.executeQuery();