title: Select join statement is not working
body: <p>I'm trying to make an output array from next statement:</p>
  
  <p>I have 2 tables. In each table there is "material_code" which plays the main role. I want to select <em>material_code</em> from <em>table1</em> where it'is equal to <em>material_code</em> from <em>table2</em> and join them where <em>status</em> (from table2) is equal to <em>0</em>. </p>
  
  <p>This is what I've got so far. </p>
  
  <pre><code>SELECT material_code FROM table1 
  LEFT JOIN table2 ON material_code WHERE status IS 0
  </code></pre>
  
  <p>Solution:</p>
  
  <pre><code>SELECT material_code FROM table1 
  LEFT JOIN table2 ON table1.material_code = table2.material_code WHERE status = 0
  </code></pre>
  
  <p>Thank everyone.</p>