title: MySQL force query to return NULL
body: <p>I have the following:</p>
  
  <pre><code>SELECT q25, COUNT( q25 ) AS count, AVG (q1) AS q1
  FROM tresults WHERE id = 'Yes' AND date = 'MARCH2010' AND q25 = '1' 
  GROUP BY q25
  </code></pre>
  
  <p>At the moment, the query returns <code>MySQL returned an empty result set (i.e. zero rows).</code> which is correct - is it possible to get it to return <code>NULL</code> instead?</p>
  
  <p><strong>OR</strong></p>
  
  <p>Is there a way of dealing with this after the event in PHP, such as:</p>
  
  <pre><code>$resultprev = mysql_query($queryprev);
  if($resultprev == ''){
  // do something
  }
  </code></pre>