Ranking working with AJAX using the database pacmandb