is the script part suppose to go into a different file ?

On Monday, July 7, 2014 2:12:25 PM UTC-4, khalil negron wrote:
>
> Trying to turn this data retrieved from mysql database into a chart or 
> graph. 
> Here my code queries the database and displays it as a table, i want to 
> also display it as a chart underneath the table. I have read all the google 
> doc information still can not grasp this. Can someone help.
>
> Thanks
>
> <?php
>
> //formula for toner usage total pages/35000 = #toner used for month
>
> if(isset($_POST["YEAR"])) { 
>     $year = $_POST['YEAR'];
>  $result = mysqli_query($dbhandle,"SELECT `Servers`, `Total Pages` / 
> 35000 FROM summaryofserver WHERE 
> RIGHT(Servers,4) = '$year'");
> $result2 = mysqli_query($dbhandle, "SELECT SUM(`Total Pages` / 35000) FROM 
> summaryofserver WHERE 
> RIGHT(Servers,4) = '$year'");
>  echo "<table border='1'>
> <tr>
> <th>Server, Month, Year</th>
> <th>Number of Toner Cartridges Used</th>
> </tr>";
>  while($row = mysqli_fetch_array($result)) {
> echo "<tr>";
> echo "<td>" . $row[0] . "</td>";
> echo "<td>" . $row[1] . "</td>";
> echo "</tr>";
> }
> $sum = mysqli_fetch_array($result2);
> echo "<tr>";
> echo "<td>" .'Total for Year:'. $year. "</td>";
> echo "<td>" . $sum[0] . "</td>";
> echo "</tr>";
> echo "</table>";
> } 
> ?>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.

Reply via email to