title: Having trouble selecting maximum id from table
body: <p>I have a table named 'users' with the the following columns:</p>
  
  <pre><code>ID
  username
  password
  </code></pre>
  
  <p>and I am creating a php script to grab the maximum ID from the table.</p>
  
  <pre><code>&lt;?php
  $query = mysql_query("SELECT MAX(ID) FROM users") or die("Error type 1");
  $query_row = mysql_fetch_array($query) or die("Error type 2");
  $maxID = ($query_row[ID]) or die("Error type 3");
  echo "$maxID";
  ?&gt;
  </code></pre>
  
  <p>When I execute this php script, it prints "Error type 3". Does anyone know why?</p>