title: graph is not generating in php and mysql with fusion charts
body: <p>I want to generate line graph based on database. First time i am using fusion charts, i follow the procedure for the dynamic charts in fusion charts documentation. Here is my php page code:</p>
  
  <pre><code>&lt;?php
  include("Includes/FusionCharts.php");
  include("Includes/DBconn.php");
  ?&gt;
  &lt;html&gt;
      &lt;title&gt; Blood Pressure&lt;/title&gt;
      &lt;head&gt;
          &lt;script language="javascript" src="FusionCharts/FusionChart.js"&gt;&lt;/script&gt;
  
      &lt;/head&gt;
      &lt;body&gt;
      &lt;center&gt;
          &lt;?php
  
          //connect to the DB
          $link= connectToDB();
          //$strXML will be used to store the entire XML document generated
     //Generate the graph element
     $strXML = "&lt;graph caption='Blood Pressure Reading' subCaption='By Patient'xaxisname='Months' yaxisname='Blood Pressure' hovercapbg='F5589A' hovercapborder='F5589A' rotateNames='1' yAxisMaxValue='200'&gt;";
  
     //Fetch records from database
     $query= "select * from patient_health";
     $result = mysql_query($query) or die(mysql_error());
     echo $result;
  
     //Iterate through each patient blood pressure systole
  
         while($row= mysql_num_rows($result)){
             //Generate the setname and value
            // echo $row['Date'];
             //echo $row['Systole_reading'];
             $strXML.="&lt;set name='".$row['Date']."'value='".  $row['Systole_reading']."'/&gt;";
             mysql_free_result($result);
         }     
  
         //Finally, close &lt;graph&gt; element
     $strXML .= "&lt;/graph&gt;";
     //Create the chart - Pie 3D Chart with data from $strXML
     echo renderChart("FusionCharts/FCF_Line.swf", "", $strXML, "BloodPressure", 650, 450);
  
         ?&gt;
  
      &lt;/center&gt;
  
      &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>I am getting error as:
  Warning: mysql_num_rows(): 6 is not a valid MySQL result resource in C:\xampp\htdocs\phpfusion\ramfusion\Chart.php on line 28
  Chart. 
  Can anyone please help me in this regard,
  Thank you in advance,
  Ramsai</p>