Sorry,,this is my php file
<?php
$con=mysql_connect("localhost","root","") or die("problemas al conectarse
al server!!!!");
mysql_select_db("rpmproject", $con);
$sth = mysql_query("SELECT * FROM diabetes WHERE Patient_ID ='123456789'
ORDER BY Date_of_Measure DESC LIMIT 7");
$rows = array();
$flag = true;
$table = array();
$table['cols'] = array(
array('label' => 'Date_of_Measure', 'type' => 'date'),
array('label' => 'BloodGlucose', 'type' => 'number'),
);
$rows = array();
while($r = mysql_fetch_assoc($sth)) {
$temp = array();
$dateTimeArr = explode(' ', $r['Date_of_Measure']);
$dateArr = explode('-', $dateTimeArr[0]);
$year = (int)$dateArr[0];
$month =(int)$dateArr[1] ; // months are zero-indexed
$day =(int) $dateArr[2];
$temp[] = array('v' => "Date($year, $month, $day)");
$temp[] = array('v' => (int) $r['BloodGlucose']);
$rows[] = array('c' => $temp);
}
$table['rows'] = $rows;
$jsonTable = json_encode($table);
echo $jsonTable;
?>
--
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.