Browse Source

mine audit

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

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

@ -15,6 +15,7 @@ import engine.objects.MineProduction; @@ -15,6 +15,7 @@ import engine.objects.MineProduction;
import engine.objects.Resource;
import org.pmw.tinylog.Logger;
import java.net.UnknownHostException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -69,9 +70,11 @@ public class dbMineHandler extends dbHandlerBase { @@ -69,9 +70,11 @@ public class dbMineHandler extends dbHandlerBase {
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM obj_mine;")) {
ResultSet rs = preparedStatement.executeQuery();
mines = getObjectsFromRs(rs, 1000);
while(rs.next()){
mines.add(new Mine(rs));
}
} catch (SQLException e) {
} catch (SQLException | UnknownHostException e) {
Logger.error(e);
}
return mines;

Loading…
Cancel
Save