title: MySql Inner Join with WHERE clause
body: <p>Here is my code:</p>
  
  <pre><code> SELECT table1.f_id  FROM table1 WHERE table1.f_com_id = '430' AND      
   table1.f_status = 'Submitted' 
   INNER JOIN table2
   ON table2.f_id = table1.f_id
   where table2.f_type = 'InProcess'
  </code></pre>
  
  <p>I need information from <code>table1</code> as all the id associated with <code>f_com_id</code> as 430 and status as submitted and the type should be only in process which is stored in other table(<code>table2</code>)</p>
  
  <p><code>f_id</code> is <code>p_key</code> and <code>f_key</code> in both the tables.<br>
  But this giving me errors, I think I am placing the <code>WHERE</code> clause wrong, how to fix it.?</p>
  
  <blockquote>
    <p>Error msg: #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INNER JOIN table2
    ON table2.f_id = ' at line 2 </p>
  </blockquote>