The code you used was
<?php
$GetRanks = mysql_query("SELECT id, name FROM ranks WHERE id > '5' ORDER BY id DESC");
while($Ranks = mysql_fetch_assoc($GetRanks))
{
$GetUsers = mysql_query("SELECT username,motto,last_online,online,look FROM users WHERE rank = {$Ranks['id']}")...