program delete on a table with foreign key constraints and delete NO ACTION
<p>So I have five tables: job , category, job_category, client and job_client. job_client and job_category have an FK of job_id which references job table. Those FK's are set to ON DELETE NO ACTION. What I'm trying to figure out is whats a good way to program this so that I can click a button to delete a job from the job table, but it automatically goes and delete its references in the job_category and job_client first, then delete the job. I'm using MySQL and PHP. Thanks.</p>