21 lines
566 B
PHP
21 lines
566 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
|
|
if (!empty($_REQUEST['flex_indent_id'])) {
|
|
$indent_id = $_REQUEST['flex_indent_id'];
|
|
|
|
|
|
$query = "DELETE indent_master, indent_items FROM indent_master JOIN indent_items ON indent_master.indent_id = indent_items.indent_id WHERE indent_master.indent_id = ?";
|
|
|
|
$stmt = $conn->prepare($query);
|
|
$stmt->bind_param("s", $indent_id);
|
|
|
|
if ($stmt->execute()) {
|
|
echo json_encode("SUCCESS");
|
|
} else {
|
|
echo json_encode("FAILURE");
|
|
die(mysqli_error($conn));
|
|
}
|
|
$stmt->close();
|
|
}
|