1
Friends, I have a little problem: I need to take each of the Rows of a query with a loop. I saw a code in Stackoverflow, but it doesn’t work. Anyone who knows how to do it, please let me know.
Follows the code:
ResultSet rs = conn.prepareStatement("SELECT * FROM `rankups`").executeQuery();
do {
String nick = rs.getString("nick");
String rank = rs.getString("rank");
UUID uuid = Bukkit.getOfflinePlayer(nick).getUniqueId();
Rankupbr.DATA_YAML.set(uuid.toString(), rank);
} while (rs.next());
What is the error of the code ?
– RickPariz