'.$index.'
'.htmlspecialchars($artist).'
'.htmlspecialchars($artist).'

'.htmlspecialchars($title).'

'.$stat_label.': '.$total.$stat_suffix.'
'; } /* ========================= DATA QUERIES ========================= */ // 1. Top Requested $topreq = ''; $sql_req = "SELECT r.songID, COUNT(*) AS total, s.artist, s.title FROM requests r JOIN songs s ON s.ID = r.songID GROUP BY r.songID ORDER BY total DESC LIMIT 10"; $res_req = mysqli_query($db_conx, $sql_req); // 2. Top Liked $likedlist = ''; $sql_like = "SELECT sl.likes AS songID, COUNT(*) AS total, s.artist, s.title FROM songlikes sl JOIN songs s ON s.ID = sl.likes GROUP BY sl.likes ORDER BY total DESC LIMIT 10"; $res_like = mysqli_query($db_conx, $sql_like); // 3. Top Played $toppld = ''; $sql_play = "SELECT artist, title, count_played AS total FROM songs WHERE song_type='0' ORDER BY count_played DESC LIMIT 10"; $res_play = mysqli_query($db_conx, $sql_play); ?>

🏆 Requests

0) { $i=1; while($row = mysqli_fetch_assoc($res_req)) { echo render_top_card($i, $row, 'Aangevraagd', 'x'); $i++; } } else { echo '

Geen data beschikbaar.

'; } ?>

❤️ Populair

0) { $i=1; while($row = mysqli_fetch_assoc($res_like)) { echo render_top_card($i, $row, 'Likes', ''); $i++; } } else { echo '

Geen data beschikbaar.

'; } ?>

🎧 Airplay

0) { $i=1; while($row = mysqli_fetch_assoc($res_play)) { echo render_top_card($i, $row, 'Gedraaid', 'x'); $i++; } } else { echo '

Geen data beschikbaar.

'; } ?>