<?php

$con = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
$roll = $request->getAttribute('roll_no');
$response=array();


//paper start query
$sql = "SELECT student.insitute_name,student.student_name,student.roll_number,student.department,student.batch,student.email_id,department.dept_name,department.dept_shortcode FROM student INNER JOIN department ON department.dept_id = student.department  WHERE student.roll_number = $roll";

$result = mysqli_query($con,$sql);



while($row = mysqli_fetch_assoc($result)){
    $data = $row;

    
   
  
}

echo json_encode($data);
?>