-
Notifications
You must be signed in to change notification settings - Fork 0
/
getsub2.php
19 lines (16 loc) · 866 Bytes
/
getsub2.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
require 'connection.php';
$ayear = $_GET['ayear'];
$degree = $_GET['degree'];
$dept = $_GET['dept'];
$sem =$_GET['sem'];
$sec = $_GET['sec'];
$fname = trim($_GET['fname']);
$sname = trim($_GET['sname']);
$sql = "select avg(rfeed),avg(ifeed),avg(pfeed),avg(afeed),avg(sfeed),avg(crfeed),avg(bfeed),avg(ffeed),avg(cofeed),avg(vfeed),avg(scover) from feedback where ayear='".$ayear."' and degree='".$degree."' and dept='".$dept."' and sem='".$sem."' and sec='".$sec."' and sname='".$sname."' and fname='".$fname."'";
$result = mysqli_query($con,$sql);
while($row = mysqli_fetch_array($result))
{
echo "{\"rfeed\":".$row[0].",\"ifeed\":".$row[1].",\"pfeed\":".$row[2].",\"afeed\":".$row[3].",\"sfeed\":".$row[4].",\"crfeed\":".$row[5].",\"bfeed\":".$row[6].",\"ffeed\":".$row[7].",\"cofeed\":".$row[8].",\"vfeed\":".$row[9].",\"scover\":".$row[10]."}";
}
?>