My SQL query is this
SELECT firstname AS 'User', count( * ) AS 'Number of photos uploaded'
FROM members
JOIN member_photo
USING ( member_id )
GROUP BY firstname
Basically it is displaying data as follows:
User Number of photos uploaded
Az 1
Mz 3
and so on..
What I want to do is transfer this data to a XML file in the form :
<photos>
<user>Az</user>
<user_photos>1</user_photos>
<user>Mz</user>
<user_photos>3</user_photos>
</photos>
or any other appropriate way.