<?php

	include '../../autoload.php';

	
	$conn = get_dbconnection();
	
	$point_id = $_REQUEST['point_id'];
	$audit_id= $_REQUEST['audit_id'];
	$sql = "delete from audit_subrecord where  audit_record_id in (select id from audit_record where audit_id=".$audit_id." and quaad_point_id=".$point_id." );";
	$sql.= "delete from audit_recordprocedure where audit_record_id in (select id from audit_record where audit_id=".$audit_id." and quaad_point_id=".$point_id." );";
	$query = pg_query($conn,$sql);
	if($query)
	{
	}

	header('Content-Type: text/xml');
	echo "<root></root>"; 
?>