<?php

include "../../classes/autoload.php";

$res = $db->query("job_card_attachments", "DELETE FROM job_card_attachments WHERE record_id = {$_POST['record_id']} LIMIT 1");
unlink("attachments/" . $_POST['attachment_file']);