Project Description:
Hi,
I have a mysql table (see attached for sample). I need to query the database and transform the result into XML; this is to be done using PHP.
First, I need a PHP form that will allow me to select the date range that I want to query in the database (i.e. so that I can narrow down the number of months that the query is looking for. Then a Submit button that runs the query and generate an XML file.
In the database, dates are stored like 2010-03-01 (for march the 1st 2010) but the XML result needs to group all results for march and count them. It also needs to ignore any dates that are "01/01/0001"
The XML needs to look like this (see http://www.maani.us/xml_charts/index.php?menu=Reference&submenu=Databases for an example).
Using the attached sample table; I'd expect the following XML based on a query looking for results between January and May
<chart>
<chart_data>
<row>
<null/>
<string>January 2010</string>
<string>February 2010</string>
<string>March 2010</string>
<string>April 2010</string>
<string>May 2010</string>
</row>
<row>
<string>problem_approveddate</string>
<number>3</number>
<number>2</number>
<number>3</number>
<number>3</number>
<number>3</number>
</row>
<row>
<string>problem_knownerrordate</string>
<number>1</number>
<number>2</number>
<number>3</number>
<number>1</number>
<number>2</number>
</row>
<row>
<string>problem_closeddate</string>
<number>1</number>
<number>0</number>
<number>1</number>
<number>1</number>
<number>3</number>
</row>
</chart_data>
</chart>