|
|
@ -830,4 +830,47 @@ public class Games { |
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
} |
|
|
|
|
|
|
|
public String checkPublishersEu() { |
|
|
|
String result = ""; |
|
|
|
String query = "SELECT Game_Publisher_EU FROM Games"; |
|
|
|
boolean sega = false; |
|
|
|
boolean nintendo = false; |
|
|
|
|
|
|
|
try { |
|
|
|
Connection connection = DriverManager.getConnection(databaseURL); |
|
|
|
|
|
|
|
Statement statement = connection.createStatement(); |
|
|
|
ResultSet resultSet = statement.executeQuery(query); |
|
|
|
|
|
|
|
while (resultSet.next()) { |
|
|
|
String gamePublisherEu = resultSet.getString("Game_Publisher_EU"); |
|
|
|
|
|
|
|
if (sega && gamePublisherEu.equals("Sega")) { |
|
|
|
continue; |
|
|
|
} else if (nintendo && gamePublisherEu.equals("Nintendo")) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
switch (gamePublisherEu) { |
|
|
|
case "Sega": |
|
|
|
sega = true; |
|
|
|
break; |
|
|
|
case "Nintendo": |
|
|
|
nintendo = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
result += gamePublisherEu + ", "; |
|
|
|
|
|
|
|
} |
|
|
|
statement.close(); |
|
|
|
connection.close(); |
|
|
|
|
|
|
|
} catch (SQLException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
} |
|
|
|
|
|
|
|
return result.substring(0, result.length() - 2); |
|
|
|
} |
|
|
|
} |