title: " error in your SQL syntax .. near 'key' "
body: <p>i get an error while executing this particular php script and i have no clue what could possibly be wrong with it.</p>
  
  <p>Error 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='value'' at line 1</p>
  
  <p>Php code:</p>
  
  <pre><code>&lt;?php 
  include("includes/onbowlconnect.php");
  
  $key = $_GET['key'];
  
  $query = mysql_query("SELECT * FROM bowlvalidkeys WHERE key='$key'") or die (mysql_error());
  
  $result = mysql_num_rows($query);
  
  if($result == 1)
  {
      echo 'GameIDkey was succesfully validated !';
  }
  else
  {   
      echo 'GameIDkey is not valid , please try again';
  }
  ?&gt;
  </code></pre>
  
  <p>Can anyone help me out here ?</p>
  
  <p>Thanks!</p>