title: Cannot add foreign key in InnoDB
body: <p>In phpMyAdmin when i try to add foreign key some error occurs and does not tell what is wrong. Just says "FK fails".</p>
  
  <p>Can any one tell what is the problem?</p>
  
  <pre><code>Error
  
  SQL query:
  
  ALTER TABLE `hotel` ADD FOREIGN KEY ( `type_id` ) REFERENCES `hotel`.`hotel_type` (
  `id`
  ) ON DELETE CASCADE ON UPDATE CASCADE ;
  
  MySQL said: Documentation
  #1452 - Cannot add or update a child row: a foreign key constraint fails (`hotel`.`#sql-cfc_e`, CONSTRAINT `#sql-cfc_e_ibfk_2` FOREIGN KEY (`type_id`) REFERENCES `hotel_type` (`id`) ON DELETE CASCADE ON UPDATE CASCADE) 
  </code></pre>