-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudent_pie.php
More file actions
48 lines (27 loc) · 912 Bytes
/
student_pie.php
File metadata and controls
48 lines (27 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
include 'database.php';
$sql = "SELECT * FROM attendence1 where facid like '".$_GET["facid"]."' and subject like '".$_GET["subject"]."'";
$result = mysqli_query($conn, $sql);
$data[]=array();
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
//echo $row['facid'];
$data[0][]=$row;
}
}
$enroll=$_GET["enrollment"];
$sql = "SELECT * FROM attendence2 where enrollment like '".$enroll."' and subject like '".$_GET["subject"]."' and facid like '".$_GET["facid"]."'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
// output data of each row
while($row = mysqli_fetch_assoc($result)) {
// echo $row['enrollment'];
$data[1][]=$row;
}
} else {
}
//print_json_encode($data);
//echo json_encode($data);
mysqli_close($conn);
?>