diff --git a/admin.php b/admin.php index db69168..d2cce77 100644 --- a/admin.php +++ b/admin.php @@ -1,43 +1,133 @@ query('SELECT COUNT(*) FROM clubs'); + $count_clubs = $stmt_clubs->fetchColumn(); + + // Count tournaments + $stmt_tournaments = $pdo->query('SELECT COUNT(*) FROM tournaments'); + $count_tournaments = $stmt_tournaments->fetchColumn(); + +} catch (PDOException $e) { + // Handle DB connection error + $count_clubs = 0; + $count_tournaments = 0; + $error_message = "Database error: " . $e->getMessage(); +} ?> - +
-