Advertisement
nicatronTg

Untitled

Apr 28th, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.42 KB | None | 0 0
  1.     public boolean newsCheck(Player ply) {
  2.         try {
  3.             ResultSet r = plugin.sqldb.executeQuery(
  4.                     "SELECT * FROM `newsread` WHERE `Name`=?", ply.getName());
  5.             if (!r.first()) {
  6.                 plugin.sqldb.executeSQL("INSERT INTO `newsread` VALUES(?, ?)",
  7.                         ply.getName(), false);
  8.                 return false;
  9.             } else {
  10.                 return r.getBoolean("Read");
  11.             }
  12.         } catch (SQLException e) {
  13.             e.printStackTrace();
  14.         }
  15.         return false;
  16.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement