I am kind of new to flex, too, but here is how I would do it.
First you get your php code to turn the query resulta in xml
data, turning everything into nodes. You have several examples on
the web that tells you how to do this.
Then, in Flex, you use Datagrid, for one, to get the data
from the php file as you would do with a regular xml file (using
httpservice). then you choose the nodes you want to use and the
data on each record to display in each column of the datagrid.