Skip to content

Commit

Permalink
Fixed Preorder Storage
Browse files Browse the repository at this point in the history
  • Loading branch information
TechsCode committed Aug 28, 2020
1 parent bb3bf03 commit ca05d07
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ public Set<Preorder> getPreorders(String plugin) {
Connection connection = mysql.getConnection();
PreparedStatement preparedStatement = connection.prepareStatement("SELECT * FROM " + plugin.replace(" ", "") + "Preorders;");
ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) ret.add(new Preorder(plugin, rs.getString("email"), rs.getLong("discordId"), rs.getString("discordName"), rs.getString("transactionId")));
while (rs.next()){
String transactionId = rs.getString("transactionId");

if(!transactionId.equals("NONE")){
ret.add(new Preorder(plugin, rs.getString("email"), rs.getLong("discordId"), rs.getString("discordName"), transactionId));
}
}
rs.close();
connection.close();
} catch (SQLException e) {
Expand Down

0 comments on commit ca05d07

Please sign in to comment.