title: How to check fetched result set is empty or not?
body: <p>For example:</p>
  <pre><code>$sql = 'select a, b, c from table where condition';
  $stmt-&gt;prepare($sql);
  $stmt-&gt;execute();
  $data = $stmt-&gt;fetch();
  </code></pre>
  <p>AND</p>
  <pre><code> $sql = 'select a, b, c from table where condition';
   $stmt-&gt;prepare($sql);
   $stmt-&gt;execute();
   $data = $stmt-&gt;fetchAll();
  </code></pre>
  <p>How to check if result set is empty or not</p>