added static delete method

This commit is contained in:
Djalim Simaila 2023-01-24 19:35:32 +01:00
parent d3774578e7
commit 0af8d23970

View File

@ -55,4 +55,12 @@ final class DifficultyModel
if ($row === false) return null;
return DifficultyModel::getByID($row['ID']);
}
public static function deleteByID($I_id)
{
$O_model = Model::get();
UserModel::anonymiseByID($I_id);
$stmt = $O_model->prepare("DELETE FROM DIFFICULTY WHERE ID=:id");
$stmt->bindParam("id", $I_id);
$stmt->execute();
}
}