mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-27 08:50:51 +01:00
Fix queries
This commit is contained in:
parent
dcb717b118
commit
0a4d934c10
@ -29,7 +29,7 @@ public class GiveRespect extends RCONMessage<GiveRespect.JSONGiveRespect> {
|
|||||||
habbo.getHabboStats().respectPointsToGive += object.daily_respects;
|
habbo.getHabboStats().respectPointsToGive += object.daily_respects;
|
||||||
habbo.getClient().sendResponse(new UserObjectComposer(habbo));
|
habbo.getClient().sendResponse(new UserObjectComposer(habbo));
|
||||||
} else {
|
} else {
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET respects_given = respects_give + ?, respects_received = respects_received + ?, daily_respect_points = daily_respect_points + ? WHERE user_id = ? LIMIT 1")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_settings SET respects_given = respects_given + ?, respects_received = respects_received + ?, daily_respect_points = daily_respect_points + ? WHERE user_id = ? LIMIT 1")) {
|
||||||
statement.setInt(1, object.respect_received);
|
statement.setInt(1, object.respect_received);
|
||||||
statement.setInt(2, object.respect_given);
|
statement.setInt(2, object.respect_given);
|
||||||
statement.setInt(3, object.daily_respects);
|
statement.setInt(3, object.daily_respects);
|
||||||
|
@ -22,7 +22,7 @@ class QueryDeleteHabboBadge implements Runnable {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM user_badges WHERE users_id = ? AND badge_code = ?")) {
|
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM users_badges WHERE user_id = ? AND badge_code = ?")) {
|
||||||
statement.setInt(1, this.habbo.getHabboInfo().getId());
|
statement.setInt(1, this.habbo.getHabboInfo().getId());
|
||||||
statement.setString(2, this.name);
|
statement.setString(2, this.name);
|
||||||
statement.execute();
|
statement.execute();
|
||||||
|
Loading…
Reference in New Issue
Block a user