so, there is a server somewhere with a MySql database? and you want to have it run a select which you will then download and display in a table? if yes, are you running that server and/or are you authorized to run a php script on that server and/or are you authorized to make requests to the administrator resulting in a custom script for your use? if no, you can't do what you're asking. if yes, the syntax for making a MySql select and stepping through the results will look very familiar to you when you see it. but unless you're administering the server, it's going to be tough to get anything going. plus there's no sense getting into php if you're not allowed to run it on the server.
that said, technically, if there is an online form that users can populate to make the server spill its guts, then you could leverage that form to make an httputils request directly to the server as if you were the online form. do you understand? you mimic the form, if such a form exists. it's done all the time and simply replaces the form with a direct request. perfectly legal.