title: Query empty if included
body: <p>I have been performing a query inside my page -- say, page.php -- where I run a simple query.</p>
  
  <p><em>Pseudo-code:</em></p>
  
  <pre><code>$request_unavailble = mysqli_query($mysqli, "SELECT * FROM my_table WHERE availble='0'");
  </code></pre>
  
  <p>When this is performed from within page.php, I get all results where availble is set to 0. However, if I run this from within a seperate included file, the data returns empty. In fact, <code>mysqli_num_rows</code> returns 0 when included.</p>
  
  <p>What's going wrong, here?</p>
  
  <hr>
  
  <h3>Edit</h3>
  
  <p>The following function was added as an include (both as a function and alone)</p>
  
  <pre><code>function compte_messagerie()
  {
      $requetes_messagerie = mysqli_query($mysqli, "SELECT * FROM ".DB_PREFIX."messagerie WHERE lu='0'");
      if(mysqli_num_rows($requetes_messagerie) == 0)
      {
          echo '&lt;a id="messagerie" href="messagerie"&gt;'.AUCUN_NOUVEAU."&lt;/a&gt;";
      }
      else if(mysqli_num_rows($requetes_messagerie) == 1)
      {
          echo '&lt;a id="messagerie" href="messagerie"&gt;';
          echo '&lt;span&gt;'.mysqli_num_rows($requetes_messagerie)."&lt;/span&gt; ";
          echo MESSAGES_SINGULIER."&lt;/a&gt;";
      }
      else
      {
          echo '&lt;a id="messagerie" href="messagerie"&gt;';
          echo '&lt;span&gt;'.mysqli_num_rows($requetes_messagerie)."&lt;/span&gt; ";
          echo MESSAGES_PLURIEL."&lt;/a&gt;";
      }
  }
  </code></pre>