title: SQL Multiple Joins multiple where
body: <p>I have three tables is question. categories, vocabulary &amp; tex. I am trying to figure out how to have multiple joins in my query, i thought you can just add as many joins as you wanted, as long as you reference them properly. </p>
  
  <p>So, the following two work perfectly on there own:</p>
  
  <p>1.</p>
  
  <pre><code>SELECT 
  categories.ID AS ID,
  categories.ParentID AS ID,
  vocabulary.value AS Name
  FROM categories
  INNER JOIN vocabulary
  ON categories.sid=vocabulary.sid
  WHERE vocabulary.langid=1
  </code></pre>
  
  <p>2.</p>
  
  <pre><code>SELECT 
  categories.ID AS ID,
  categories.ParentID AS ID,
  tex.value AS Description
  FROM categories
  INNER JOIN tex
  ON categories.tid=tex.tid
  WHERE tex.langid=1
  </code></pre>
  
  <p>However, if i try to combine them as follows, it does not work.</p>
  
  <pre><code>categories.ID AS ID,
  categories.ParentID AS ID,
  vocabulary.value AS Name
  tex.value AS Description
  FROM categories
  INNER JOIN tex
  ON categories.tid=tex.tid
  WHERE tex.langid=1
  
  INNER JOIN vocabulary
  ON categories.sid=vocabulary.sid
  WHERE vocabulary.langid=1
  </code></pre>
  
  <p>Any ideas?</p>
  
  <p>Thanks in advance
  John</p>