Browse Source

mine audit

lakebane-master
FatBoy-DOTC 7 months ago
parent
commit
c43f70128a
  1. 12
      src/engine/db/handlers/dbMineHandler.java

12
src/engine/db/handlers/dbMineHandler.java

@ -56,8 +56,17 @@ public class dbMineHandler extends dbHandlerBase {
ArrayList<Mine> mines = new ArrayList<>(); ArrayList<Mine> mines = new ArrayList<>();
//try (Connection connection = DbManager.getConnection();
// PreparedStatement preparedStatement = connection.prepareStatement("SELECT `obj_mine`.*, `object`.`parent` FROM `object` INNER JOIN `obj_mine` ON `obj_mine`.`UID` = `object`.`UID`")) {
// ResultSet rs = preparedStatement.executeQuery();
// mines = getObjectsFromRs(rs, 1000);
// } catch (SQLException e) {
// Logger.error(e);
//}
try (Connection connection = DbManager.getConnection(); try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT `obj_mine`.*, `object`.`parent` FROM `object` INNER JOIN `obj_mine` ON `obj_mine`.`UID` = `object`.`UID`")) { PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) {
ResultSet rs = preparedStatement.executeQuery(); ResultSet rs = preparedStatement.executeQuery();
mines = getObjectsFromRs(rs, 1000); mines = getObjectsFromRs(rs, 1000);
@ -65,7 +74,6 @@ public class dbMineHandler extends dbHandlerBase {
} catch (SQLException e) { } catch (SQLException e) {
Logger.error(e); Logger.error(e);
} }
return mines; return mines;
} }

Loading…
Cancel
Save