9
0
mirror of https://github.com/WiIIiam278/HuskSync.git synced 2025-12-19 14:59:21 +00:00

fix: sql syntax in getUnpinnedSnapshotCount (#485)

An AND on a FROM clause
This commit is contained in:
ilightwas
2025-04-11 10:41:33 -03:00
committed by GitHub
parent 805ffb19c2
commit 06d8dda7dd
2 changed files with 4 additions and 4 deletions

View File

@@ -309,8 +309,8 @@ public class MySqlDatabase extends Database {
try (Connection connection = getConnection()) {
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
SELECT COUNT(`version_uuid`)
FROM `%user_data_table%` AND `pinned`=false
WHERE `player_uuid`=?;"""))) {
FROM `%user_data_table%`
WHERE `player_uuid`=? AND `pinned`=false;"""))) {
statement.setString(1, user.getUuid().toString());
final ResultSet resultSet = statement.executeQuery();
if (resultSet.next()) {

View File

@@ -298,8 +298,8 @@ public class PostgresDatabase extends Database {
try (Connection connection = getConnection()) {
try (PreparedStatement statement = connection.prepareStatement(formatStatementTables("""
SELECT COUNT(`version_uuid`)
FROM `%user_data_table%` AND `pinned`=false
WHERE `player_uuid`=?;"""))) {
FROM `%user_data_table%`
WHERE `player_uuid`=? AND `pinned`=false;"""))) {
statement.setString(1, user.getUuid().toString());
final ResultSet resultSet = statement.executeQuery();
if (resultSet.next()) {