﻿<?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 Free / FusionCharts Free and PHP   / multiseries bar chart with mysql as database in php / 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, 02 Dec 2008 07:08:37 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>I got the error.&lt;/P&gt;&lt;P&gt;The error was on line&lt;/P&gt;&lt;P&gt;$strXML = $strCat.$strDataXML;&lt;/P&gt;&lt;P&gt;I made following change to the line&lt;/P&gt;&lt;P&gt;$strXML .= $strCat.$strDataXML; I place . operator after $strXML. Now it works fine&lt;/P&gt;&lt;P&gt;Thanks for continous reply for my each question.</description><pubDate>Thu, 17 Apr 2008 08:07:38 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>Hi,&lt;/P&gt;&lt;P&gt;Could you please attach the screenshot of the cases with the 2 charts - cFREE chart v3.&lt;/P&gt;&lt;P&gt;It seems that the XML is invalid which once we receive the XML would be able to say. The problem with the v3 Chart (MSColumn3D.swf)  might be that the chart SWF is not present in that path and is not loading showing blank space.&lt;/P&gt;&lt;P&gt;Could you also make sure that you are connecting to the database and table properly?&lt;/P&gt;&lt;P&gt;The previous screenshot shows that the PHP file is not getting executed even. Could you please (Just for a test) try copying only the &amp;lt;?php ... ?&amp;gt; portion to another php file and add the code to generate the XML (as suggested by Arindam)  and try again? &lt;/P&gt;&lt;P&gt;For better debugging of the XML that would be built i would suggest you to use Firefox to open the XML generating php file. Firefix generally points out the invalid portion of the XML.</description><pubDate>Thu, 17 Apr 2008 07:36:18 GMT</pubDate><dc:creator>Sudipto Choudhury</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>It shows following error xml page cannot be displayed.&lt;/P&gt;&lt;P&gt;&lt;TABLE width=400&gt;&lt;P style="FONT: 13pt/15pt verdana"&gt;The XML page cannot be displayed &lt;P style="FONT: 8pt/11pt verdana"&gt;Cannot view XML input using style sheet. Please correct the error and then click the &lt;A href="javascript:location.reload()" target=_self&gt;Refresh&lt;/A&gt; button, or try again later. &lt;HR&gt;&lt;P style="FONT: bold 8pt/11pt verdana"&gt;Whitespace is not allowed at this location. Error processing resource 'http://localhost/test2/passvisachart.php'. Line 1, ...&lt;/P&gt;&lt;PRE style="FONT-WEIGHT: normal; FONT-SIZE: 10pt; LINE-HEIGHT: 12pt; FONT-STYLE: normal; FONT-VARIANT: normal"&gt;&lt;FONT color=blue&gt;&amp;lt;?&lt;/FONT&gt;&lt;/PRE&gt;&lt;TBODY&gt;&lt;/TBODY&gt;&lt;/P&gt;&lt;/TABLE&gt;</description><pubDate>Thu, 17 Apr 2008 06:54:24 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>Please use this you will get XML out put and send it to me&lt;/P&gt;&lt;P&gt;//Create the chart - Column 2D Chart with data from strXML&lt;BR&gt; //echo renderChart("FusionCharts/FCF_MSColumn3D.swf", "", $strXML, "FactoryDetailed", 600, 300, false, false);&lt;/P&gt;&lt;P&gt; //set content type as XML&lt;BR&gt; header('Content-type: text/xml');&lt;BR&gt; #Return the chart XML for Column 3D Chart &lt;BR&gt; print $strXML;</description><pubDate>Thu, 17 Apr 2008 06:44:05 GMT</pubDate><dc:creator>Arindam</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>how to get xml output? please tell me.</description><pubDate>Thu, 17 Apr 2008 06:31:51 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>&lt;SPAN style="FONT-SIZE: 11pt; LINE-HEIGHT: 115%; FONT-FAMILY: Calibri; mso-fareast-font-family: Calibri; mso-bidi-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"&gt;&lt;FONT color=#000000&gt;could you please send us XML output&lt;/FONT&gt;&lt;/SPAN&gt;</description><pubDate>Thu, 17 Apr 2008 06:26:10 GMT</pubDate><dc:creator>Arindam</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>when I used FCF_MSColumn3D.swf instead of MSColumn3D it shows invalid xml data error &amp;amp;&lt;/P&gt;&lt;P&gt;if I use MSColumn3D.swf it doesnot show anything (blank output). Also I have removed return &lt;/P&gt;&lt;P&gt;xml;</description><pubDate>Thu, 17 Apr 2008 05:17:14 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>still it it showing blank output.</description><pubDate>Thu, 17 Apr 2008 05:14:06 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>Hi maheshshinde9&lt;/P&gt;&lt;P&gt;Could you please remove return from your code and try again?&lt;/P&gt;&lt;P&gt; //Return&lt;BR&gt; // return $strXML; no need of that</description><pubDate>Thu, 17 Apr 2008 04:56:44 GMT</pubDate><dc:creator>Arindam</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>I have changed chart to graph. but still it is not working.</description><pubDate>Thu, 17 Apr 2008 04:36:20 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item><item><title>RE: multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>Hi maheshshinde9&lt;BR&gt;  Yor are using here Free Version of FusionCharts and You using here V3 version of XML. That’s why not working. In free version root tag is &amp;lt;graph&amp;gt;. Please use free version XML. For more information please see &lt;A href="http://www.fusioncharts.com/free/docs"&gt;http://www.fusioncharts.com/free/docs&lt;/A&gt;&lt;BR&gt;</description><pubDate>Thu, 17 Apr 2008 04:10:01 GMT</pubDate><dc:creator>Arindam</dc:creator></item><item><title>multiseries bar chart with mysql as database in php</title><link>http://www.fusioncharts.com/forum/Topic5718-43-1.aspx</link><description>//following is php code .but does not give any output.&lt;/P&gt;&lt;P&gt;first query give the following data through database&lt;/P&gt;&lt;P&gt;ids&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;3&lt;/P&gt;&lt;P&gt;second query give following data through database for ids=1&lt;/P&gt;&lt;P&gt;Total   month    product_id &lt;BR&gt;1          2           1 &lt;/P&gt;&lt;P&gt;2          3            1&lt;/P&gt;&lt;P&gt;3           4            1&lt;/P&gt;&lt;P&gt;same data come for ids =2 &amp;amp; ids=3 with same values of month &amp;amp; different Total&lt;/P&gt;&lt;P&gt;but following php code does not give any output &lt;/P&gt;&lt;P&gt;&amp;lt;?php&lt;BR&gt;      //Generate the graph element string&lt;BR&gt;    $strXML = "&amp;lt;chart caption='Factory  Output ' subcaption='(In Units)' xAxisName='Date' formatNumberScale='0' decimalPrecision='0'&amp;gt;";&lt;/P&gt;&lt;P&gt;    // Connet to the DB&lt;BR&gt;    $link = connectToDB();&lt;BR&gt; &lt;BR&gt;   //To store categories - also flag to check whether category is&lt;BR&gt; //already generated&lt;BR&gt;    $catXMLDone = false;&lt;BR&gt; //Initialize XML elements&lt;BR&gt; $strCat = "&amp;lt;categories&amp;gt;";&lt;BR&gt; &lt;BR&gt; //First we need to get unique categories in the database&lt;BR&gt; $strSQL = "Select product_id as ids from products where product_id &amp;lt;='3' ORDER BY product_id";&lt;BR&gt;    $result = mysql_query($strSQL) or die(mysql_error());&lt;BR&gt; &lt;BR&gt;  //To store datasets and sets&lt;BR&gt;    $strDataXML = "";&lt;BR&gt; &lt;BR&gt;   if ($result) &lt;BR&gt;   {&lt;BR&gt;        while($orsCat = mysql_fetch_array($result)) &lt;BR&gt;  {&lt;BR&gt;            //Add this category as dataset&lt;BR&gt;            $strDataXML .= "&amp;lt;dataset seriesName='" .$orsCat['ids']. "'&amp;gt;";&lt;/P&gt;&lt;P&gt;    //Now, we get the data for that factory&lt;BR&gt;      $strSQL = "SELECT count(oi.product_id) as Total, Month(o.order_complete) as month, oi.product_id FROM  order_items as oi, orders as o,products as p WHERE oi.product_id='".$orsCat['ids']."' AND p.product_id = oi.product_id AND o.order_id = oi.order_id GROUP BY Month(o.order_complete) ";&lt;BR&gt;     //Execute it&lt;BR&gt;            $result2 = mysql_query($strSQL) or die(mysql_error());&lt;BR&gt;            while($ors = mysql_fetch_array($result2))&lt;BR&gt;    {&lt;BR&gt;   //Append &amp;lt;category label=''&amp;gt; if not already done&lt;BR&gt;                if (!$catXMLDone) &lt;BR&gt;    {&lt;BR&gt;                   $strCat .= "&amp;lt;category label='" .$ors['month'] . "' /&amp;gt;";&lt;BR&gt;                }&lt;BR&gt;               //Append data&lt;BR&gt;                 $strDataXML .= "&amp;lt;set value='" . $ors['Total'] . "' /&amp;gt;";&lt;BR&gt;   }&lt;BR&gt;            //Update flag that we've appended categories  &lt;BR&gt;            $catXMLDone = true;&lt;BR&gt;            //Clear up objects&lt;BR&gt;            mysql_free_result($result2);&lt;BR&gt;            //Close dataset element&lt;BR&gt;            $strDataXML .= "&amp;lt;/dataset&amp;gt;";&lt;BR&gt;        }&lt;BR&gt;    }&lt;BR&gt;    mysql_close($link);&lt;/P&gt;&lt;P&gt;    //Close &amp;lt;/categories&amp;gt;&lt;BR&gt; $strCat .= "&amp;lt;/categories&amp;gt;";&lt;BR&gt; //Create full XML&lt;BR&gt; $strXML = $strCat . $strDataXML;&lt;/P&gt;&lt;P&gt;    //Return&lt;BR&gt; return $strXML;&lt;/P&gt;&lt;P&gt;    //Close &amp;lt;graph&amp;gt; element&lt;BR&gt;    $strXML .= "&amp;lt;/chart&amp;gt;";&lt;BR&gt; &lt;BR&gt;    //Create the chart - Column 2D Chart with data from strXML&lt;BR&gt; echo renderChart("FusionCharts/FCF_MSColumn3D.swf", "", $strXML, "FactoryDetailed", 600, 300, false, false);&lt;BR&gt;?&amp;gt;</description><pubDate>Thu, 17 Apr 2008 01:54:21 GMT</pubDate><dc:creator>maheshshinde9</dc:creator></item></channel></rss>