title: SQL Delete based on condition in join
body: <p>It is possible to delete records based on a satisfied condition with a join query?</p>
  
  <p>For instance, I have a linking table joining 3 records. The query I have at the moment deletes records from this table where one of the id's isn't <code>IN()</code> an imploded Php array. I've come to realise that the query should only remove records from this table if the id's don't exist in the array and they belong to a certain other table based on the a link to another table.</p>