Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void addPlayer(Integer value) {
- try {
- PreparedStatement playersUpdate = con.prepareStatement("UPDATE tablename SET online=? WHERE players=?;");
- //^^This is you getting what your putting it into.
- coinsUpdate.setInt(1, value); //Update it to what value you put in
- coinsUpdate.executeUpdate(); //Execute all the updates.
- coinsUpdate.close();
- } catch (SQLException e) {
- e.printStackTrace(); //Should NEVER error unless the SQL database is offline & the server is online.
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement