title: PHP get last entry
body: <p>So I need to find the last entry of my MySql table, I get the first one this way:</p>
  
  <pre><code>if($f4==0) { /*do this*/ } else { /*or do that*/ }
  </code></pre>
  
  <p>I have a table with incremented IDs, but it is sorted out by position like this:</p>
  
  <pre><code>$query="SELECT * FROM promotions ORDER BY position";
  </code></pre>
  
  <p>I would basicly need something like:</p>
  
  <pre><code>if($f4==Last row in table) { /*Do this*/ } else { /*Or do that*/ }
  </code></pre>