﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>FusionCharts Forum / FusionCharts v3 / Using FusionCharts / FusionCharts and PHP  / SQL - PHP Multi-Series Chart. / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>FusionCharts Forum</description><link>http://www.fusioncharts.com/forum/</link><webMaster>support@fusioncharts.com</webMaster><lastBuildDate>Tue, 07 Oct 2008 15:30:17 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: SQL - PHP Multi-Series Chart.</title><link>http://www.fusioncharts.com/forum/Topic6081-31-1.aspx</link><description>Hi, &lt;BR&gt;For Multi-series charts the XML structure is a bit different from single series XML. Hence, would you need to design the process of fetching data from database as per the XML structure. Could you please refer to the MS XML structure from : &lt;BR&gt;&lt;A href="http://fusioncharts.com/docs/Contents/MultiSeries.html"&gt;http://fusioncharts.com/docs/Contents/MultiSeries.html&lt;/A&gt;.&lt;BR&gt; &lt;BR&gt;Please also refer to the code that we provide below which might suit you needs. Please note that since we do not know what value might be there in status field you might need to modify the code as per the value in it. &lt;BR&gt;</description><pubDate>Sat, 21 Jun 2008 01:10:26 GMT</pubDate><dc:creator>Arindam</dc:creator></item><item><title>RE: SQL - PHP Multi-Series Chart.</title><link>http://www.fusioncharts.com/forum/Topic6081-31-1.aspx</link><description>What kind of problem do you exactly have with your MS chart? Can you post the code for it here? Or have you tried turning DebugMode on to see what your xml would look like...If you are getting all the data from the database (which i think is the hardest part :-)) then the rest should be ok...unless you mess up xml formatting which the debugger will tell you about</description><pubDate>Sun, 15 Jun 2008 07:45:00 GMT</pubDate><dc:creator>elena1707</dc:creator></item><item><title>SQL - PHP Multi-Series Chart.</title><link>http://www.fusioncharts.com/forum/Topic6081-31-1.aspx</link><description>Hi, I was able to create a chart using a single series but spent nights trying to create a multi-series chart with no good result.  If anyone can help me with this it would be of great help.&lt;br&gt;&lt;br&gt;Here are my tables.&lt;br&gt;&lt;br&gt;2 SQL tables:&lt;br&gt;&lt;br&gt;Engineers &amp; Disks&lt;br&gt;&lt;br&gt;ENGINEERS&lt;br&gt;- eng_id&lt;br&gt;- first_name&lt;br&gt;- last_name&lt;br&gt;&lt;br&gt;DISKS&lt;br&gt;- job_no&lt;br&gt;- model_no&lt;br&gt;- status (value of either Complete of Fail)&lt;br&gt;&lt;br&gt;What I would like to do is create a query that would display total number of Engineer's Complete and Fail job.&lt;br&gt;probably would look like this: (I only edited the image so you'll understand what i want).&lt;br&gt;[img]http://i125.photobucket.com/albums/p66/nashsaint/eng.png[/img]&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;If its gonna help I also have posted the code for single series chart.&lt;br&gt;&lt;br&gt;[quote]&lt;&lt;br&gt;&lt;br&gt;   require_once ('./mysql_connect.php'); // Connect to the db.&lt;br&gt;&lt;br&gt;   //$strXML will be used to store the entire XML document generated&lt;br&gt;   //Generate the chart element&lt;br&gt;   $strXML = "&lt;chart caption='Total Jobs TCd' subCaption='By Engineer' formatNumberScale='0' numberSuffix=' Disks'&gt;";&lt;br&gt;&lt;br&gt;   //Fetch all factory records&lt;br&gt;   $strQuery = "select * from engineers";&lt;br&gt;   $result = mysql_query($strQuery) or die(mysql_error());&lt;br&gt;&lt;br&gt;&lt;br&gt;   //Iterate through each engr&lt;br&gt;&lt;br&gt;   if ($result) {&lt;br&gt;      while($ors = mysql_fetch_array($result)) {&lt;br&gt;         //Now create a second query to get details for this engr&lt;br&gt;         $strQuery = "SELECT COUNT(disk_id) AS TotOutput FROM disks WHERE eng_id=" . $ors['eng_id'];&lt;br&gt;         $result2 = mysql_query($strQuery) or die(mysql_error());&lt;br&gt;         $ors2 = mysql_fetch_array($result2);&lt;br&gt;         //Generate &lt;set label='..' value='..'/&gt;&lt;br&gt;         $strXML .= "&lt;set label='" . $ors['first_name'] . "' value='" . $ors2['TotOutput'] . "' /&gt;";&lt;br&gt;         //free the resultset&lt;br&gt;         mysql_free_result($result2);&lt;br&gt;      }&lt;br&gt;   }&lt;br&gt;   mysql_close(); // Close the database connection.&lt;br&gt;&lt;br&gt;   //Finally, close &lt;chart&gt; element&lt;br&gt;   $strXML .= "&lt;/chart&gt;";&lt;br&gt;&lt;br&gt;   //Create the chart - Pie 3D Chart with data from $strXML&lt;br&gt;   echo renderChart("./charts/Column3D.swf", "", $strXML, "FactorySum", 650, 400, false, false);&lt;br&gt;[/quote]&lt;br&gt;&lt;br&gt;&lt;br&gt;Many Thanks foryour help.</description><pubDate>Sat, 03 May 2008 17:07:55 GMT</pubDate><dc:creator>nashsaint</dc:creator></item></channel></rss>