title: Syntax error 256 in WHERE clause
body: <p>I am trying to update a field in my table and I keep getting this syntax error.</p>
  
  <pre><code>global $conn, $strTableName;
  db_exec("UPDATE equipment SET EContractNum = " . $_SESSION[$strTableName."_masterkey1"] . " WHERE EContractNum = " . $values['EContractNum'], $conn);
  </code></pre>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Error type: 256 Error Description: 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 'WHERE econtractnum=35867111' at line
    1</p>
  </blockquote>
  
  <p>I have looked at several searchs that are similair to mine but I cannot figure out what I am doing wrong. I am fairly new at this so it is probably something simple. I just cant seem to make it work. Thanks for any help.</p>