sql query to get a number on to a google charts field doesnt work
I am using the following code to out put a number to a google chart
var data = google.visualization.arrayToDataTable([
['CourseID', 'CourseName', 'Department', 'NumberOfStudents'],
<?php while($row = mysql_fetch_array($rs)){?> <?php $courseid=$row =
mysql_fetch_array($rs) ?>
['<?php echo $row['CourseID']?>' , '<?php echo $row['CourseName']?>',
'<?php echo $row['DeptID']?>', <?php
$sql1=("SELECT * FROM Batch WHERE CourseID='$courseid'");
$res=mysql_query($sql1,$conn);
while($row = mysql_fetch_array($rs)){
$number=$number+$row['NumSTud'];
}
echo '$number';
When I open the page through apache, an empty page is shown. When I
switched on errror reporting no errors were shown either.
No comments:
Post a Comment