title: Inner JOIN is returning duplicate rows
body: <p>I have the following table structure and I have included the primary and foreign keys in each table:</p>
  
  <pre><code>CREATE TABLE `Table1` (
  `Table1_ID` int(6) ,
  `Table2_FK` int(6) ,
   **Other Fields***
  ) 
  
  CREATE TABLE `Table2` (
  `Table2_ID` int(6) ,
  `Table3_FK` int(11),
   **Other Fields***
  ) 
  CREATE TABLE `Table3` (
  `Table3_ID` int(6) ,
  `Table2_FK` int(11),
   **Other Fields***
  ) 
  
  CREATE TABLE `Table4` (
  `Table4_ID` int(6) ,
  `Table3_FK` int(11),
   **Other Fields***
  ) 
  
  CREATE TABLE `Table5` (
  `Table5_ID` int(6) ,
  `Table4_FK` int(6),
   **Other Fields***
  ) 
  </code></pre>
  
  <p>I have set up the following foreign keys:</p>
  
  <pre><code> ALTER TABLE `Table5`
   ADD CONSTRAINT `table5_ibfk_4` FOREIGN KEY (`Table4_FK `) REFERENCES   `Table4` (`Table4_ID`);
  
   ALTER TABLE `Table4`
   ADD CONSTRAINT `table4_ibfk_3` FOREIGN KEY (`Table3_FK `) REFERENCES `Table3` (`Table3_ID`);
  
   ALTER TABLE `Table1`
  ADD CONSTRAINT `table1_ibfk_2` FOREIGN KEY (`Table2_FK `) REFERENCES     `Table2` (`Table2_ID `);
  
   ALTER TABLE `Table2`
   ADD CONSTRAINT `table2_ibfk_1` FOREIGN KEY (`Table3_FK`) REFERENCES `Table3` (`Table3_ID `);
  </code></pre>
  
  <p>My problem is when I run the following INNER JOIN query:</p>
  
  <pre><code> SELECT *
   FROM `Table1 `
   INNER JOIN `Table2` ON `Table1`.`Table2_FK` =`Table2`.`Table2_ID` 
   INNER JOIN `Table3` ON `Table2`.`Table3_FK` = `Table3`.`Table3_ID` 
   INNER JOIN `Table4` ON `Table3`.`Table3_ID` = `Table4`.`Table3_FK ` 
   INNER JOIN `Table5` ON `Table4`.`Table4_ID` = `Table5`.`Table4_FK ` 
   WHERE (`Table1`.`Table1_ID ` ='43');
  </code></pre>
  
  <p>I am expecting two rows to be returned as there are only two records where the ID is 43, as stated in the 'WHERE' clause. Instead it returns 8 records with an ID of 43, I thought an INNER Join would only return results where it is true instead of all results.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Current Data is below:</p>
  
  <pre><code>INSERT INTO `Table1` (`Table1_ID `, `OtherData`, `Table2_FK `, `OtherData2`, `Date`) VALUES
  (42, 1, 1, 'New', '2015-03-10 17:41:50'),
  (43, 1, 1, 'New', '2015-03-10 17:44:35'),
  (44, 1, 1, 'New', '2015-03-10 17:50:34'),
  (45, 1, 1, 'New', '2015-03-10 17:55:20'),
  (46, 1, 1, 'New', '2015-03-10 18:10:47');
  
  INSERT INTO `Table2` (`Table2_ID `, `OtherData3`, `OtherData4 `,     `OtherData5`, `OtherData6`) VALUES
  (1, 'blahtype', NULL, 1, '2015-03-13 00:00:00');
  
  INSERT INTO `Table3` (`Table3_ID `, `Table2_FK `, `OtherData6`) VALUES
  (1, 1, 'blahname');
  
  INSERT INTO `Table4` (`Table4_ID`, `Table3_FK `, `OtherData6`, `OtherData7`,     `OtherData7`) VALUES
  (2, 1, 'blahfieldname', 'blahcont', 'blahtype'),
  (3, 1, 'blahfieldname2', 'blahcont', 'blahtype');
  
  INSERT INTO `Table5` (`Table5_ID `, `OtherData`, `Table4_FK`, `OtherData`) VALUES
  (1, 'test2', 2, 42),
  (2, 'test3', 3, 42),
  (3, 'Test4', 2, 43),
  (4, 'test5', 3, 43),
  (5, 'test6', 2, 44),
  (6, 'test7', 3, 44),
  (9, 'test8', 2, 78),
  (10, 'test9',3, 78);
  </code></pre>
  
  <p>Current Output is:</p>
  
  <pre><code> |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |2|1| blahfieldname | blahcont | blahtype |1|test2|2|42
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |2|1| blahfieldname | blahcont | blahtype |3|test3|2|43
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |2|1| blahfieldname | blahcont | blahtype |5|test4|2|44
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |2|1| blahfieldname | blahcont | blahtype |9|test5|2|78
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |3|1| blahfieldname2| blahcont | blahtype |2|test6|3|42
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |3|1| blahfieldname2| blahcont | blahtype |4|test7|3|43
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |3|1| blahfieldname2| blahcont | blahtype |6|test8|3|44
   |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |3|1| blahfieldname2| blahcont | blahtype |10|test9|3|78
  </code></pre>
  
  <p>Expected output is:</p>
  
  <pre><code>|43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |2|1| blahfieldname | blahcont | blahtype |3|test3|2|43
  |43|1|1|New|2015-03-10 17:44:35|1| blahtype |NULL|1|2015-03-13 00:00:00|1|1| blahname |3|1| blahfieldname2| blahcont | blahtype |4|test7|3|43
  </code></pre>