title: PHP MySQL Query doesn't work, but works from terminal
body: <p>Here's my code:
  <pre><code>$gid = (int) stripslashes($_POST['id']);
  echo $gid;</p>
  
  <p>$db = dbConnect();
  $test = $db->query('update games set played = played + 1 where id = "$gid"');
  echo $db->error;
  echo $db->errno;
  die();
  }
  </pre></code>
  It works fine from the terminal, and it correctly prints out $gid, and no errors are returned. Am I missing something really obvious?</p>