This commit is contained in:
Heliosares
2023-03-13 18:51:44 -04:00
parent 380c2734e6
commit a9bd661ebd
3 changed files with 9 additions and 2 deletions

View File

@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>AuxProtect</groupId>
<artifactId>AuxProtect</artifactId>
<version>1.2.5.2-pre2</version>
<version>1.2.5.2-pre3</version>
<name>AuxProtect</name>
<build>
<finalName>${project.artifactId}-${project.version}</finalName>

View File

@@ -186,7 +186,7 @@ public class InvCommand extends Command {
private static void update(IAuxProtect plugin, Player staff, long time) throws SQLException {
plugin.getSqlManager().execute(
"UPDATE " + Table.AUXPROTECT_INVENTORY + " SET data=ifnull(data,'')||? WHERE time=? AND action_id=?",
"UPDATE " + Table.AUXPROTECT_INVENTORY + " SET data=" + plugin.getSqlManager().concat("ifnull(data,'')", "?") + " WHERE time=? AND action_id=?",
30000L, LocalDateTime.now().format(XrayCommand.ratedByDateFormatter) + ": Recovered by " + staff.getName() + "; ",
time, EntryAction.INVENTORY.id);
}

View File

@@ -430,4 +430,11 @@ public class ConnectionPool {
}
}
public String concat(String s1, String s2) {
if (isMySQL()) {
return "CONCAT(" + s1 + "," + s2 + ")";
} else {
return s1 + "||" + s2;
}
}
}