Delete load_leaderboard.php

This commit is contained in:
5803025035 2025-12-09 22:44:57 -05:00
parent bf438cfbba
commit e8a13ad9cf

View File

@ -1,23 +0,0 @@
<?php
require 'db.php';
header('Content-Type: application/json');
try {
$stmt = $pdo->query("
SELECT u.id AS user_id, u.username, s.wins, s.losses
FROM users u
LEFT JOIN users_stats s ON s.user_id = u.id
GROUP BY u.id
ORDER BY s.wins DESC, s.losses ASC
LIMIT 20
");
$rows = $stmt->fetchAll();
echo json_encode($rows);
} catch (Exception $e) {
echo json_encode([
"error" => $e->getMessage()
]);
}