Fix SQL return value

This commit is contained in:
Bea 2022-10-24 21:36:18 +02:00
parent 47ce85a1ed
commit 27544accb1

View File

@ -145,7 +145,8 @@ public class DatabaseManager
pStatement.setString(1, pronoun);
pStatement.setString(2, format);
pStatement.setInt(3, pronounId);
return pStatement.execute();
pStatement.executeUpdate();
return true;
} catch (SQLException e)
{
logger.err(e.getMessage());
@ -200,7 +201,7 @@ public class DatabaseManager
for(String q : queries) {
try(Statement stmt = dbConnection.createStatement()) {
stmt.execute(q);
stmt.executeUpdate(q);
} catch (SQLException e) {
logger.err(e.getMessage());
return false;
@ -224,7 +225,8 @@ public class DatabaseManager
pStatement.setInt(1, mainPronounId);
pStatement.setInt(2, secondaryPronounId);
pStatement.setString(3, playerName);
return pStatement.execute();
pStatement.executeUpdate();
return true;
} catch (SQLException e) {
logger.err(e.getMessage());
}