title: How to debug "mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given"?
body: <p>I am new to PHP and it is showing </p>
  
  <blockquote>
    <p>"warning: mysqli_fetch_array() expects parameter 1 to be
    mysqli_result, boolean given"</p>
  </blockquote>
  
  <p>My Code is :</p>
  
  <pre><code>&lt;?php
  include_once 'Conn.php';
   $qry="select * from sumit";
    $res=  mysqli_query($GLOBALS['link'],$qry);
  echo '&lt;table border="5"&gt;';
  echo '&lt;tr&gt;&lt;th&gt;Empno&lt;/th&gt;&lt;th&gt;Name&lt;/th&gt;&lt;th&gt;Adress&lt;/th&gt;&lt;th&gt;Salary&lt;/th&gt;&lt;/tr&gt;';
  
  while($r= mysqli_fetch_array($res))
      {
          echo "&lt;tr&gt;&lt;td&gt;$r[0]&lt;/td&gt;&lt;td&gt;$r[1]&lt;/td&gt;&lt;td&gt;$r[2]&lt;/td&gt;&lt;td&gt;$r[3]&lt;/td&gt;&lt;/tr&gt;";
      }  
      echo '&lt;/table&gt;'; 
  </code></pre>