title: Troubleshoot PHP MySQL Query
body: <p>I am trying to run this query:</p>
  
  <pre><code>$q1 = "INSERT INTO `Validation` (`Key`, `Status`, `Notes`, `Serial`) VALUES (max(Key)+1, 'Valid', '".mysql_real_escape_string($user)."', '0')";
  </code></pre>
  
  <p>through my PHP script, but each time it displays this error:</p>
  
  <pre><code>You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Key)+1, 'Valid', 'USER', '0')' at line 1
  </code></pre>
  
  <p>Any ideas?</p>