title: Deleting related records in MySQL
body: <p>I have two MySQL (MyISAM) tables:</p>
  
  <pre><code>Posts: PostID(primary key), post_text, post_date, etc. 
  
  Comments: CommentID(primary key), comment_text, comment_date, etc.  
  </code></pre>
  
  <p>I want to delete all the comments in the "Comments" table belonging to a particular post, when the corresponding post record is deleted from the "Posts" table. </p>
  
  <p>I know this can be achieved using cascaded delete with InnoDB (by setting up foreign keys). But how would I do it in MyISAM using PHP?</p>