title: sql correct but in php it skips the first result
body: <p>I use this: <code>foreach ($result as $row) { $row["testID"], $row["subject"], ... };</code> to output all the values. 
  <br>
  The sql works fine but when I go to the page it always shows me all the output without the first element that is in the array.
  <br>
  For example if I have 5 tests to show to the user it only shows test 2, 3, 4 and 5 but not the first one in the array <code>$result.</code>
  <br>
  This is all the code (sorry it's in dutch):
  <br></p>
  
  <pre><code>require_once( "common.inc.php" );
      require_once( "DataObject.class.php" );
  
      class StatistiekAanpassen extends DataObject {
          public function toetsen() {
              $conn = parent::connect();
  
              $order = isset( $_GET["order"] ) ? preg_replace( "/[^ a-zA-Z]/", "", $_GET["order"] ) : "toetsID";
  
              /*SQL om alle toetsen op te halen*/
              $sql = "SELECT toetsID, onderwerp, puntentotaal, vak 
                      FROM Toets 
                      WHERE NOT EXISTS 
                          (SELECT * 
                          FROM LeerlingToets 
                          WHERE Toets.toetsID = LeerlingToets.toetsID AND 
                          LeerlingToets.gebruikerID = " . $_SESSION["member"]-&gt;getValue( "gebruikerID" ) . " ) order by " . $order;
  
              $result = $conn-&gt;query($sql);
  
              if ($result-&gt;fetchColumn()) {
                  echo "&lt;table id=\"toetsTable\"&gt;";
                  ?&gt;
                  &lt;tr&gt;
                      &lt;th id="toetsTableIDth"&gt;&lt;?php if ( $order != "toetsID" ) { ?&gt;&lt;a href="statistiekenAanpassen.php?order=toetsID"&gt;&lt;?php } ?&gt;Nr&lt;?php if ( $order != "toetsID" ) { ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/th&gt;
                      &lt;th id="toetsTableIDth"&gt;&lt;?php if ( $order != "onderwerp" ) { ?&gt;&lt;a href="statistiekenAanpassen.php?order=onderwerp"&gt;&lt;?php } ?&gt;Onderwerp&lt;?php if ( $order != "onderwerp" ) { ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/th&gt;
                      &lt;th id="toetsTableIDth"&gt;&lt;?php if ( $order != "vak" ) { ?&gt;&lt;a href="statistiekenAanpassen.php?order=vak"&gt;&lt;?php } ?&gt;Vak&lt;?php if ( $order != "vak" ) { ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/th&gt;
                      &lt;th id="toetsTableIDth"&gt;&lt;?php if ( $order != "puntentotaal" ) { ?&gt;&lt;a href="statistiekenAanpassen.php?order=puntentotaal"&gt;&lt;?php } ?&gt;Puntentotaal&lt;?php if ( $order != "puntentotaal" ) { ?&gt;&lt;/a&gt;&lt;?php } ?&gt;&lt;/th&gt;
                  &lt;/tr&gt;
                  &lt;?php
                      foreach ($result as $row) {
                          echo "&lt;tr&gt;&lt;td class=\"IDtd\"&gt;&lt;a href=\"statistiekenAanpassen.php?toetsID=" . $row["toetsID"] . "\"&gt;" . $row["toetsID"] . "&lt;/a&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;a href=\"statistiekenAanpassen.php?toetsID=" . $row["toetsID"] . "\"&gt;" . $row["onderwerp"] . "&lt;/a&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;a href=\"statistiekenAanpassen.php?toetsID=" . $row["toetsID"] . "\"&gt;" . $row["vak"]. "&lt;/a&gt;&lt;/td&gt;
                      &lt;td&gt;&lt;a href=\"statistiekenAanpassen.php?toetsID=" . $row["toetsID"] . "\"&gt;" . $row["puntentotaal"]. "&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;";
                      }
                  echo "&lt;/table&gt;";
              } else {
                  echo "&lt;p&gt;Er zijn nog geen toetsen.&lt;p&gt;";
                  echo "&lt;p&gt;OF&lt;p&gt;";
                  echo "&lt;p&gt;U heeft voor alle toetsen al punten ingegeven.&lt;p&gt;";
              }
          }
      }
  </code></pre>
  
  <p><br>
  How can I output all the elements, also the first one?</p>