31 lines
835 B
PHP
31 lines
835 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
// $agencyId = $_REQUEST['agencyId'];
|
|
|
|
|
|
$sub_query = "select checkup_section_ids from checkup_form where checkup_id = '".$_REQUEST['checkup_id']."'";
|
|
|
|
$result_sub = mysqli_query($conn,$sub_query);
|
|
|
|
$row_sub = mysqli_fetch_array($result_sub);
|
|
|
|
$query = "select section_id,section_name from checkup_form_section where section_id in (".$row_sub['checkup_section_ids'].");";
|
|
|
|
error_log("CHECKUP SECTIONS::" .$query);
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
$data = array();
|
|
if(mysqli_num_rows($result) > 0) {
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
$data[] = $row;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
$data['status'] = 200;
|
|
$data['message'] = "Data not found!";
|
|
}
|
|
echo json_encode($data);
|
|
?>
|