title: Return 0 if no records found on COUNT(*) query In MYSQL
body: <p>I want to get '0' when no records found on execution of <code>sql</code> query. I try so many things like <strong>ifnull(count(*),0)</strong> but not gives me the result which i want. </p>
  
  <p>Query is mention as below : </p>
  
  <pre><code>SELECT chat_room_id,COUNT(*) FROM chat  WHERE sender_id=13 GROUP BY chat_room_id 
  </code></pre>
  
  <p>It gives me the result as below:</p>
  
  <pre><code>__________________________
  | chat_room_id | Count(*) |
  --------------------------
  </code></pre>
  
  <p>It not return any 'null' or '0' , so i want to get '0' OR 'null' if no records found.</p>