Google Chart with Database.
<?php include("db.php"); $query = "select * from warehouse"; if ($result = mysql_query($query)) { { $rows = array(); $table = array(); $table['cols'] = array( array('label' => 'Warehouse', 'type' => 'string'), array('label' => 'Percentage', 'type' => 'number') ); while ($row =mysql_fetch_array($result)) { $begani=mysql_fetch_array(mysql_query("select sum(stcokprice) from beganinventory where warehouse='$row[2]'")); $a="warehouse"; $b=200; $temp = array(); $temp[] = array('v' => (string) $row[2]); $temp[] = array('v' => (int) $begani[0]); $rows[] = array('c' => $temp); } } ...