Advertisement
Guest User

Untitled

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