16 lines
283 B
PHP
16 lines
283 B
PHP
<?php
|
|
|
|
include('connection.php');
|
|
|
|
$conn = OpenCon();
|
|
|
|
$selectSql = "SELECT * FROM Leaderboard ORDER BY points DESC";
|
|
$selectQuery = mysqli_query($conn, $selectSql);
|
|
$arr = [];
|
|
while($row = mysqli_fetch_assoc($selectQuery)){
|
|
array_push($arr, $row);
|
|
}
|
|
|
|
echo json_encode($arr);
|
|
|
|
?>
|