
<?php
$echo "dsa";
$con = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
$paper_id = $request->getAttribute('paper');
$response=array();


//paper start query
$sql = "SELECT units FROM units WHERE set_papers_id = $paper_id";

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



while($row = mysqli_fetch_assoc($result)){
    $data = json_decode($row['units']);

    
   
  
}

echo json_encode($data);
?>

// <?php
// echo "das";
// $con = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// $roll = $request->getAttribute('roll_no');
// $response=array();

// echo $roll;
// echo "dsga";
// //paper start query
// $sql = "SELECT student.student_name,student.roll_number,student.insitute_name,student.department,student.batch,student.email_id,department.dept_name,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);
// ?>