Allright, do not know your knowledge of PHP/mySQL and ajax, but let's give it a try.
So, in a nutshell, Ajax is a javascript code, that can do many cool stuff (especially with a server!). In your case, you are using that to connect to the database on server, and retrieve things using mySQL commands. MySQL is a language used to manipulate databases that are stored on a remote server.
Your ajax script connects to a mySQL database and fills it up with user locations, correct? Then you can use the very same ajax/php code to connect to the database, and then edit the part with mySQL code, to retrieve info.
I have not programmed in web languages in a while now, so I will not be much of a help here. Do search for online leaderboard in c2, there is a tutorial or two on scirra.com that has very good explanation on how to retrieve info from a database.