Browse Source

bardiel's requested slot lookup query amendment update(again)

debug-guards
FatBoy-DOTC 3 weeks ago
parent
commit
dd959e31cb
  1. 12
      src/engine/db/handlers/dbBuildingLocationHandler.java

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

@ -32,10 +32,14 @@ public class dbBuildingLocationHandler extends dbHandlerBase { @@ -32,10 +32,14 @@ public class dbBuildingLocationHandler extends dbHandlerBase {
ArrayList<BuildingLocation> buildingLocations = new ArrayList<>();
try (Connection connection = DbManager.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT `MIN(ID)`,`BuildingID`,`slot`,`MIN(type)`,`MIN(unknown)`,`MIN(locX)`,`MIN(locY)`,`MIN(locZ)`,`MIN(w)`,`MIN(rotX)`,`MIN(rotY)`,`MIN(rotZ)` FROM static_building_location " +
"WHERE type IN (6, 8) " +
"GROUP BY BuildingID, slot " +
"ORDER BY BuildingID, slot ASC;")) {
PreparedStatement preparedStatement = connection.prepareStatement(
"SELECT MIN(ID), BuildingID, slot, MIN(type), MIN(unknown), MIN(locX), MIN(locY), MIN(locZ), " +
"MIN(w), MIN(rotX), MIN(rotY), MIN(rotZ) " +
"FROM static_building_location " +
"WHERE type IN (6, 8) " +
"GROUP BY BuildingID, slot " +
"ORDER BY BuildingID, slot ASC;"
)) {
ResultSet rs = preparedStatement.executeQuery();
buildingLocations = getObjectsFromRs(rs, 20);

Loading…
Cancel
Save