title: SQL DELETE LEFT JOIN query
body: <p>My query is:</p>
  
  <pre><code>DELETE p,p2,r 
  FROM Profiles p
  LEFT JOIN Pics p2 ON p.ID=p2.ProfileID
  LEFT JOIN Food f ON p.ID=f.ProfileID
  WHERE p.ID = 46
  </code></pre>
  
  <p>This query deletes the User's Profile, all pictures in the Pics table and all matching ProfileID in food table.
  Which would leave me
  ID 47,48 in Profile table
  ID 66,67 in Pics table
  ID 30,31,32,34 in Food table</p>
  
  <p>But I want it to also delete all the rows where the Pics.ID ProfileID is 46, so Pics.ID 64 and 65. These two IDs to be deleted from the Food table. which would be Food.ID 30 and 32 so left with just:
  ID 31, 34 in Food table</p>
  
  <p>Profile Table:</p>
  
  <pre><code>ID Gender
  46 male
  47 female
  48 female
  </code></pre>
  
  <p>Pics Table:</p>
  
  <pre><code>ID ProfileID Position
  64 46        1 
  65 46        2
  66 47        1
  67 48        1
  </code></pre>
  
  <p>Food Table:</p>
  
  <pre><code>ID PicID ProfileID
  30 64    47
  31 66    48
  32 65    47
  33 67    46
  34 67    47
  </code></pre>