title: SELECT query fails silently, no output produced
body: <p>First of all I need to tell that I'm newbie on PHP/mySQL...</p>
  
  <p>I'm trying to write simple plugins using php. Here is my php function code :</p>
  
  <pre><code>function example() {    
      global $DB;     
      $examplesql = $DB['DB_Database']-&gt;query("SELECT tid, added
                                                   FROM table GROUP BY tid
                                                   ORDER BY added DESC LIMIT 5");
      while ($row = $DB['DB_Database']-&gt;fetch_assoc($examplesql)) {
          $time = date('Y-m-d H:i:s',$row['added']);  
          $torid = $row['tid'];
      }   
      eval("\$exampletemplate = \""
           . $DB['DB_Template']-&gt;LoadTemplate('exampletemplate')
           . "\";"); 
      return $example;
  }
  </code></pre>
  
  <p>so when I create a template named as <code>exampletemplate</code> and insert into that template this;</p>
  
  <pre><code>&lt;table width="200" border="1"&gt;
    &lt;tr&gt;
      &lt;td&gt;$time&lt;/td&gt;
      &lt;td&gt;$torid;&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>it must show list of last 5 <code>tid</code> sorted by <code>added</code> but all I get is a white page. No database error, nothing. Just a white page.</p>
  
  <p>Can somebody tell me what am I doing wrong?</p>