you can now edit, add and delete results

This commit is contained in:
Grisu
2022-09-22 14:17:29 +02:00
parent c3873744be
commit e62be84d35
5 changed files with 174 additions and 40 deletions

View File

@@ -10,6 +10,13 @@
$stmt->bindParam(1, $_POST["m_id"], PDO::PARAM_INT);
$stmt->bindParam(2, $_POST["s_id"], PDO::PARAM_INT);
$stmt->execute();
if(get_direct_points($con, $_POST['s_id'])->fetch()['direkte_punkte'] == 0) {
$stmt = $con->prepare("DELETE FROM Ergebnisse WHERE m_id = ? AND s_id =?");
$stmt->bindParam(1, $_POST["m_id"], PDO::PARAM_INT);
$stmt->bindParam(2, $_POST["s_id"], PDO::PARAM_INT);
$stmt->execute();
update_points($con, $_POST["s_id"]);
}
} catch(PDOException $e) {
handle_pdo_exception($e);
}