title: SQL foreign constraints
body: <p>I want to to keys from different tables, and when I succeed, I get this error: Cannot add or update a child row: a foreign key constraint fails.</p>
  
  <p>This is how my database looks like:</p>
  
  <pre><code> POST           COMMENTS
  
   id             id 
  
   post           comment
  
   ---------      post_id
  </code></pre>
  
  <p>I want to <code>connect POST id to COMMENTS post_id.</code> When I try to add a comment on my site, that error message shows up, or sometimes in phpmyadmin whem I'm trying to make it work. Any ideas?</p>