<?php
include 'includes/db.php';

$stmt = $pdo->query('SELECT id, name, scoring_format FROM events ORDER BY id');
foreach($stmt->fetchAll(PDO::FETCH_ASSOC) as $e) {
    echo $e['id'] . ' | ' . $e['name'] . ' | ' . ($e['scoring_format'] ?? 'NULL') . "\n";
}
