I am learning MySQL with JAVA, and don’t understand prepared statements. Abstracting from I shall learn it, I want to ask for help in finishing this code to be “prepared stated” 🙂
String stringQuery = "INSERT INTO banlist (name, reason, admin, time, temptime, IP) VALUES (testNick, testPowod, testAdmin, CURRENT_TIMESTAMP, NOW(), NULL);=?";
PreparedStatement statement = this.connection.prepareStatement( stringQuery );
statement.setString( 1, ); // after ' 1, ' we define what we want to get
ResultSet resultSet = statement.executeUpdate();
Read the JDBC tutorial.