title: Get latest row of database and echo id
body: <p>I just need to get the latest row of a database and echo the id of that row. I can't seem to get it to work. I just get an "Internal Server Error" when I try to load the php page.</p>
  
  <pre><code>&lt;?php 
  include ("connection.php");
  $query = mysql_query('SELECT id FROM timestamp ORDER BY id DESC LIMIT 1');
          $result = mysqli_query($link, $query);
          $row = mysqli_fetch_array($result);
          echo $row['id'];
  ?&gt;
  </code></pre>