title: Unknown column 'tr' in where clause
body: <p>I have this MySQL query, which is failing every time:</p>
  
  <p><code>update exp_companies set company = 'Some Intermodal Container Company', auth_user = 'Some User', c_code = 'SICC', contact = 'Somes Boss', ph = '012-555-1234' where uid = 3</code></p>
  
  <p>The error I get is:</p>
  
  <pre><code>mySQL Error 1054: Unknown column 'tr' in 'where clause'
  </code></pre>
  
  <p>I have never encountered this before. I have expressed this query many ways, omitting parts, etc. But nowhere in the query there is column 'tr', mentioned in error, yet it fails.</p>
  
  <pre><code>if($opi == "exp_commit") {
  
     $dbi = sql_connect($dbhost, $dbuname, $dbpass, $mydb);
  
     $query = "select * from wmd_companies where uid = $new_scac";
  
     $result = sql_query($query, $dbi);
  
      if(!$result) { mydb_error($dbi, $query); }
        $scac_row = mysql_fetch_row($result);
        $scac_company = $scac_row[1];  
        $scac_code = $scac_row[2];   
        $scac_contact = $scac_row[3];
        $scac_ph = $scac_row[4];
        $scac_email = $scac_row[5];
  
        $exp_query = "update exp_companies set company = '$scac_company', auth_user = '$dr_name', c_code = '$scac_code', contact = '$scac_contact', ph = '$scac_ph', company_email = '$scac_email' where uid = $exp_id"; 
  
     $result = sql_query($exp_query, $dbi);
  
  
    if (!$result) { mydb_error($dbi, $exp_query); }
       echo "Success! &lt;meta http-equiv=refresh content=\"2;      URL=admin.php?opi=admin&amp;what=list\"&gt; $b";
  
    }
  </code></pre>