title: MySQL INNER JOIN two tables where one table contains multiple rows with same id
body: <p>I want to get id's from one table depending on multiple rows from another table with same id. The id's has to only be returned if all rows from the other table matches each row request. My table structure looks like this. </p>
  
  <pre>   
  tbl_one 
  ------------------  
  id  companyName 
  ------------------
  1   CompanyOne  
  2   CompanyTwo  
  
  tbl_two 
  -----------------------------   
  id  type        content
  -----------------------------
  1   zipcode     54321
  1   category    Car dealers
  2   zipcode     54321
  2   category    Supermarkets
  
  </pre>
  
  <p>I have tried with INNER JOIN, but i can't seem to make it work no matter how i try.</p>
  
  <pre>
  SELECT 
      tbl_one.id FROM tbl_one 
  INNER JOIN 
      tbl_two
  ON
      tbl_two.id = tbl_one.id 
  WHERE
  ( 
      type = 'zipcode' AND content = '54321'
  ) 
    AND
  ( 
      type = 'category' AND content = 'Car dealers' 
  )
  </pre>  
  
  <p>Can anybody answer me what i'm doing wrong with my query? 
  Thank you :)</p>