title: Deleting rows with MySQL LEFT JOIN
body: <p>I have two tables, one for job deadlines, one for describe a job. Each job can take a status and some statuses means the jobs' deadlines must be deleted from the other table.</p>
  
  <p>I can easily <code>SELECT</code> the jobs/deadlines that meets my criteria with a <code>LEFT JOIN</code>:</p>
  
  <pre><code>SELECT * FROM `deadline`
  LEFT JOIN `job` ON deadline.job_id = job.job_id
  WHERE `status` = 'szamlazva'
  OR `status` = 'szamlazhato'
  OR `status` = 'fizetve'
  OR `status` = 'szallitva'
  OR `status` = 'storno'
  </code></pre>
  
  <p>(<code>status</code> belongs to <code>job</code> table not <code>deadline</code>)</p>
  
  <p>But when I'd like to delete these rows from <code>deadline</code>, MySQL throws an error. My query is:</p>
  
  <pre><code>DELETE FROM `deadline`
  LEFT JOIN `job`
  ON deadline.job_id = job.job_id
  WHERE `status` = 'szamlazva'
  OR `status` = 'szamlazhato'
  OR `status` = 'fizetve'
  OR `status` = 'szallitva'
  OR `status` = 'storno'
  </code></pre>
  
  <p>MySQL error says nothing:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LEFT JOIN <code>job</code> ON deadline.job_id = job.job_id WHERE <code>status</code> = 'szaml' at line 1</p>
  </blockquote>
  
  <p>How can I turn my <code>SELECT</code> into a working <code>DELETE</code> query?</p>