<?php
require_once "config.php";
$id=$_POST['id'];
$con->autocommit(FALSE);
$sql="delete from vendor_invoice_details where id='".$id."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}

$sql="delete from vendor_invoice_details_history where customer_id='".$id."'";
$query=mysqli_query($con,$sql);
if($query==false){
    die(mysqli_error($con));
}
$con->commit();
echo mysqli_affected_rows($con);



$con->close();
?>