Überarbeitete Version der 1. Version. Es bestehen noch grosse Feher in einzelnen Skripten.
This commit is contained in:
74
www/liveScoring/index.php
Normal file
74
www/liveScoring/index.php
Normal file
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/*
|
||||
ini_set('display_errors', 1);
|
||||
|
||||
$baseDir = $_SERVER['DOCUMENT_ROOT'];
|
||||
|
||||
require $baseDir .'/../scripts/db/db-verbindung-script-guest.php';
|
||||
|
||||
require $baseDir . "/../scripts/db/db-tables.php";
|
||||
|
||||
$stmt = $guest->prepare("SELECT
|
||||
u.id,
|
||||
u.name,
|
||||
u.vorname,
|
||||
u.programm,
|
||||
u.verein
|
||||
FROM $tableTurnerinnen u
|
||||
WHERE (u.bezahlt = 2 OR u.bezahltoverride = 5)");
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$result = $stmt->get_result();
|
||||
$tures = $result->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
$stmt->close();
|
||||
|
||||
$indexedTures = array_column($tures, null, 'id');
|
||||
|
||||
$stmt = $guest->prepare("SELECT `note_bezeichnung_id`, `geraet_id`, `person_id`, `run_number`, `public_value`
|
||||
FROM $tableNoten
|
||||
WHERE `is_public` = 1
|
||||
AND `jahr` = 2026");
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$result = $stmt->get_result();
|
||||
$dbNoten = $result->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
$stmt->close();
|
||||
|
||||
$indexedNoten = array_column($dbNoten, null, 'person_id');
|
||||
|
||||
$stmt = $guest->prepare("SELECT `id` FROM $tableNotenBezeichnungen");
|
||||
|
||||
$stmt->execute();
|
||||
|
||||
$result = $stmt->get_result();
|
||||
$dbNotenBez = $result->fetch_all(MYSQLI_ASSOC);
|
||||
|
||||
$stmt->close();
|
||||
|
||||
$indexedNotenBez = array_column($dbNotenBez, null, 'person_id');
|
||||
|
||||
?>
|
||||
|
||||
<table>
|
||||
|
||||
<?php foreach ($indexedTures as $t) : ?>
|
||||
|
||||
<tr>
|
||||
<td><?= $t['name'] ?>, <?= $t['vorname'] ?></td>
|
||||
<td><?= $t['programm'] ?></td>
|
||||
<td><?= $t['verein'] ?></td>
|
||||
|
||||
<?php foreach ($indexedNotenBez as $t) : ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
|
||||
*/
|
||||
Reference in New Issue
Block a user