<?php

include '../../root.class.php';

$db = new db_safeguard();
try{
$db->query("lop_equipment_check_list", "DELETE FROM lop_equipment_check_list WHERE lop_id = {$_POST['lop_id']}");
$db->query("lop_food_comments", "DELETE FROM lop_food_comments WHERE lop_jobcard_no = {$_POST['lop_id']}");
$db->query("lop_jobcard", "DELETE FROM lop_jobcard WHERE record_id = {$_POST['lop_id']}");
$db->query("lop_quality_process_control", "DELETE FROM lop_quality_process_control WHERE lop_id = {$_POST['lop_id']}");

echo 1;
}catch(Exception $e){
    echo $e->getMessage();
}