26 lines
811 B
PHP
26 lines
811 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('log_entry.php');
|
|
$query="";
|
|
$checkup_id = $_REQUEST['flex_checkup_id'];
|
|
if(!empty($_REQUEST['flex_checkup_id'])){
|
|
|
|
|
|
$query_parent = " delete from checkup_form,checkup_form_key_value using checkup_form left JOIN checkup_form_key_value on checkup_form.checkup_id=checkup_form_key_value.checkup_form_id where checkup_form.checkup_id = '$checkup_id' ";
|
|
// $query_child = " delete from checkup_form_key_value where checkup_form_id = '".$_REQUEST['flex_checkup_id']." ' ";
|
|
|
|
//echo $query_parent;
|
|
error_log("query parent: ".$query_parent);
|
|
|
|
if (!$result = @mysqli_query($conn,$query_parent)) {
|
|
|
|
exit(error_log(mysqli_error($conn)));
|
|
echo json_encode("FAILURE");
|
|
}else{
|
|
echo json_encode("SUCCESS");
|
|
error_log("SUCCESS");
|
|
}
|
|
|
|
}
|
|
|
|
?>
|