29 lines
1018 B
PHP
29 lines
1018 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('includes/functions.php');
|
|
include('includes/auth/auth.php');
|
|
|
|
$response_id = $_REQUEST['response_id'];
|
|
$chs_no = $_REQUEST['chs_no'];
|
|
$data = 0;
|
|
begin();
|
|
if (isset($response_id) && isset($chs_no)) {
|
|
$query = "delete from questionaire_master_response where medical_examination_no='" . $chs_no . "' and response_id='" . $response_id . "'";
|
|
error_log(" query " . $query);
|
|
if (!$result = mysqli_query($conn, $query)) {
|
|
error_log("error in query " . mysqli_error($conn) . " query " . $query);
|
|
rollback();
|
|
} else {
|
|
$query1 = "delete from questionaire_master_response_details where response_id='" . $response_id . "'";
|
|
error_log(" query1 " . $query);
|
|
if (!$result1 = mysqli_query($conn, $query1)) {
|
|
error_log("error in query1 " . mysqli_error($conn) . " query1 " . $query1);
|
|
rollback();
|
|
}else{
|
|
$data = 1;
|
|
}
|
|
}
|
|
}
|
|
commit();
|
|
echo json_encode($data);
|
|
?>
|