fix wrong query

This commit is contained in:
Beu 2022-04-27 09:26:43 +02:00
parent 4dcfb0e9f4
commit 33194c44d4

View File

@ -130,7 +130,7 @@ class SettingManager implements CallbackListener, UsageInformationAble {
private function deleteUnusedSettings() { private function deleteUnusedSettings() {
$mysqli = $this->maniaControl->getDatabase()->getMysqli(); $mysqli = $this->maniaControl->getDatabase()->getMysqli();
$settingStatement = $mysqli->prepare("DELETE FROM `" . self::TABLE_SETTINGS . "` $settingStatement = $mysqli->prepare("DELETE FROM `" . self::TABLE_SETTINGS . "`
WHERE ((`linked` = 1 AND `serverIndex` = ?) OR `linked` = 0) AND `changed` < NOW() - INTERVAL 1 HOUR;"); WHERE ((`linked` = 0 AND `serverIndex` = ?) OR `linked` = 1) AND `changed` < NOW() - INTERVAL 1 HOUR;");
if ($mysqli->error) { if ($mysqli->error) {
trigger_error($mysqli->error); trigger_error($mysqli->error);
return null; return null;