Skip to content

Commit a13f7ea

Browse files
replaced format specifier
1 parent 43ac0e0 commit a13f7ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/net/javadiscord/javabot/systems/qotw/dao/QuestionPointsRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public List<QOTWAccount> sortByPoints() throws SQLException {
9696
* @throws SQLException If an error occurs.
9797
*/
9898
public List<QOTWAccount> getTopAccounts(int page, int size) throws SQLException {
99-
try (PreparedStatement stmt = con.prepareStatement("SELECT * FROM qotw_points WHERE points > 0 ORDER BY points DESC LIMIT %d OFFSET %d")) {
99+
try (PreparedStatement stmt = con.prepareStatement("SELECT * FROM qotw_points WHERE points > 0 ORDER BY points DESC LIMIT ? OFFSET ?")) {
100100
stmt.setInt(1, size);
101101
stmt.setInt(2, Math.max(0, (page * size) - size));
102102
ResultSet rs = stmt.executeQuery();

0 commit comments

Comments
 (0)