From ca05d07d580c9e02aab89ecd1980cd2538679ca0 Mon Sep 17 00:00:00 2001 From: TechsCode Date: Sat, 29 Aug 2020 00:33:44 +0200 Subject: [PATCH] Fixed Preorder Storage --- .../TechsCode/TechDiscordBot/mysql/storage/Storage.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/TechsCode/TechDiscordBot/mysql/storage/Storage.java b/src/main/java/me/TechsCode/TechDiscordBot/mysql/storage/Storage.java index bb8b1e36..9e827833 100644 --- a/src/main/java/me/TechsCode/TechDiscordBot/mysql/storage/Storage.java +++ b/src/main/java/me/TechsCode/TechDiscordBot/mysql/storage/Storage.java @@ -100,7 +100,13 @@ public Set 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) {