title: MySql SELECT MATCH AGAINST combined with a WHERE clause
body: <p>I am currently building a search engine using MySQL to return data about users registered in a website. The SQL being used is as follows:</p>
  
  <pre><code>SELECT id, username, country, profession, company
  FROM users
  WHERE MATCH(username, country, profession, company) AGAINST ('+query' IN BOOLEAN MODE)
  </code></pre>
  
  <p>So far, so good. What I also want is for the search engine to not return data about users whose account is inactive. There is a column in the table with the name 'inactive'. If the corresponding account is inactive, the 'inactive' field for the respective account has the value 'Y'. All active accounts have 'N' instead.</p>
  
  <p>I tried to build a query similar to the one above but also adding a "WHERE inactive='N'" clause at the very end of it.</p>
  
  <pre><code>SELECT id, username, country, profession, company
  FROM users
  WHERE (MATCH(username, country, profession, company) AGAINST ('+query' IN BOOLEAN MODE)) AND (WHERE inactive='N')
  </code></pre>
  
  <p>Unfortunately, an error is returned. Can someone help me with the syntax?</p>