title: Querying MySQL database
body: <p>I am trying to query the MySQL database to return some results. For e.g. I have a <code>HTML</code> form where user can enter some search values and can execute it. This form contains two fields: <code>Body</code> and <code>Query String</code> (these are appropriate fields with my database table).</p>
  
  <p>I am executing the query like this:</p>
  
  <pre><code>select count(*) from Message;
  </code></pre>
  
  <p>The result is: <code>7280</code></p>
  
  <p>If I execute the query like this:</p>
  
  <pre><code>select count(*) from Message where body like '%%';
  </code></pre>
  
  <p>The result is: <code>7280</code></p>
  
  <p>The body does not have any <code>null</code> values.</p>
  
  <p>But if I add another empty <code>like</code> into the query:</p>
  
  <pre><code>select count(*) from Message where body like '%%' and queryString like '%%';
  </code></pre>
  
  <p>There result is: <code>3353</code>.</p>
  
  <p>My <code>queryString</code> column contains some <code>null</code> values, which I am guessing is causing this. What I would like that query to return is the same count of results <code>(7280)</code> and ignore those <code>null</code> values. How to achieve this using MySQL?</p>