title: Mysql query with 'n' number of conditions enclosed with NOT
body: <p>Need to build Mysql where clause from the user's input.</p>
  <p>ex:
  if the user enters <code>EmpId &gt; 10 AND Dept = &quot;Prod&quot;</code> then the where clause will be</p>
  <pre><code>SELECT * FROM Emp WHERE EmpId &gt; 10 AND Dept = 'Prod'
  </code></pre>
  <p>what if the user enters like</p>
  <pre><code>NOT(EmpId &gt; 10 AND Dept = &quot;Prod&quot;)
  </code></pre>
  <p>and there may be n number of conditions can be added into NOT() condition.</p>
  <p>What would be better approach to solve this.</p>
  <p>Thanks</p>