title: How to get first id from the fetched rows in php mysql?
body: <p>I am fetching data in php from mysql table. Let say I retrieved 15 rows containing 15 unique ids. Now I want to get the the very first fetched id from the results.</p>
  
  <p>This is what I'm trying..but its giving me the last id</p>
  
  <pre><code>    &lt;?php
  
    $results = $db-&gt;query("SELECT * FROM orders where Sales_Rep='$sales_rep'");
    while($row = $results-&gt;fetch_assoc()){ 
  ?&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;?php echo $row["Order_ID"] ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row["Company_Name"]?&gt;&lt;/td&gt;  
          &lt;/tr&gt;
  &lt;?php 
          $last_order_date= $row["Order_ID"]; 
          echo $last_order_date;
          } //end of while loop
  ?&gt;
  </code></pre>