ESH/delete_past_indent_rec.php

30 lines
849 B
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
include('includes/config/config.php');
include('includes/auth/auth.php');
include('includes/functions.php');
include('access.php');
error_reporting(E_ERROR | E_PARSE);
begin();
$indent_id = $_POST['indent_id'];
if (!empty($indent_id)) {
$query = "delete from indent_master where indent_id='" . $indent_id . "'";
$result = mysqli_query($conn, $query);
if (!$result = @mysqli_query($conn, $query)) {
error_log("error " . mysqli_error($conn));
rollback();
} else {
$query1 = "delete from indent_items where indent_id='" . $indent_id . "'";
if (!$result = @mysqli_query($conn, $query1)) {
error_log("error " . mysqli_error($conn));
rollback();
} else {
$data = "SUCCESS";
}
}
} else {
$data = "FAIL";
}
commit();
echo json_encode($data);